/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $record = Disability::with('user')->get(); if (!$record) { return View::make('errors.404'); } // return View::make('disability.index')->with('data', $record); return View::make('disability.index', ['data' => $record, 'disabilities' => $this->getDisabilityListAsJson()]); }