Esempio n. 1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // TODO: figure out how to get parish information
     $groups = \montserrat\Group::whereIsActive(1)->orderBy('name')->with('members')->get();
     foreach ($groups as $group) {
         $group->count = $group->members()->count();
     }
     //dd($groups);
     return view('groups.index', compact('groups'));
     //
 }