/** * index. * * The index page for the controller. * This will load all the al the trips. */ public function index() { $user = Trips::all(); // $returnData = Fractal collection resource. // This also need pagination. return response()->json($returnData)->header('Content-Type', 'application/json'); }