public function getList() { try { return Object::all(['name', 'status']); } catch (\Exception $e) { return ['error' => $e->getMessage()]; } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $objects = Object::all(); $title = 'Administration des objets de la page Contact'; return view('admin.objects.index', compact('objects', 'title')); }