コード例 #1
0
 public function getList()
 {
     try {
         return Object::all(['name', 'status']);
     } catch (\Exception $e) {
         return ['error' => $e->getMessage()];
     }
 }
コード例 #2
0
 /**
  * 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'));
 }