app/Http/Controllers/DivisasController.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()
    {
        try {
            $divisas  = Divisa::where('estado',0)->get();
            return response()->json($divisas);
        } catch (Exception $e) {
            return response([
                    'status' => Response::HTTP_BAD_REQUEST,
                    'response_time' => microtime(true) - LARAVEL_START,
                    'divisas' => $divisas,
                    'error'=>$e->getMessage(),
                    'msg' => 'No se pudo traer las divisas'
                ],Response::HTTP_BAD_REQUEST);
        }
    }
public function index ( ) { try { $ divisas = Divisa :: where ( 'estado' , 0 ) -> get ( ) ; return response ( ) -> json ( $ divisas ) ; } catch ( Exception $ e ) { return response ( [ 'status' => Response :: HTTP_BAD_REQUEST , 'response_time' => microtime ( true ) - LARAVEL_START , 'divisas' => $ divisas , 'error' => $ e -> getMessage ( ) , 'msg' => 'No se pudo traer las divisas' ] , Response :: HTTP_BAD_REQUEST ) ; } }
Display a listing of the resource.
Display a listing of the resource .