app/Http/Controllers/ModeloController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $modelos = Modelo::where('estado',1)->orderBy('nombre')->get();
        return \response()->json([
            'status'=>"correcto",
            'modelos'=>$modelos
        ],200);
    }
public function index ( ) { $ modelos = Modelo :: where ( 'estado' , 1 ) -> orderBy ( 'nombre' ) -> get ( ) ; return \ response ( ) -> json ( [ 'status' => " correcto " , 'modelos' => $ modelos ] , 200 ) ; }
Display a listing of the resource.
Display a listing of the resource .
// $modelos = Modelo::all(); // $modelos = Modelo::all()->where('estado',1);