/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data['title'] = 'Roles & Privileges'; $data['permissions'] = Privilege::lists('permission', 'permission'); $data['allPersmissions'] = Privilege::all(); $data['roles'] = Role::where('slug', '!=', 'super_administrator')->get(); // foreach ($data['roles'] as $role) { // echo $role->permissions; // } return view('settings.roles.roles', $data); }