app/Http/Controllers/ApiVentaController.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()
    {
         return $venta = Venta::all();
        $id = Session::get('id_usuario');
        return $venta=Venta::where('id_usuario','=',$id)->get();
    }
public function index ( ) { $ id = Session :: get ( 'id_usuario' ) ; return $ venta = Venta :: where ( 'id_usuario' , '=' , $ id ) -> get ( ) ; }
Display a listing of the resource.
Display a listing of the resource .
// // return $venta = Venta::all();