app/Http/Controllers/PagamentoController.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()
    {
        $pagamentos = Pagamento::with('cliente')->with('usuario')->get();
        return json_encode($pagamentos);
    }
public function index ( ) { $ pagamentos = Pagamento :: with ( 'cliente' ) -> with ( 'usuario' ) -> get ( ) ; return json_encode ( $ pagamentos ) ; }
Display a listing of the resource.
Display a listing of the resource .