Пример #1
0
 /**
  * Retrieve all Activities.
  *
  * @param  Request  $request
  * @return Collection|Response
  */
 function index(Request $request)
 {
     try {
         return Activity::all();
     } catch (Exception $e) {
         return response()->error();
     }
 }
Пример #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $activities = Models\Activity::all();
     return view('admin.activity.index', compact('activities'));
 }