Exemple #1
0
 public function edit($id)
 {
     $menu = Menu::with('permissions')->find($id);
     $menu->role_id = $menu->roles()->first();
     if ($menu->role_id != null) {
         $menu->role_id = $menu->role_id->id;
     }
     $title = 'Edit Menu';
     $permissions = Permission::get()->sortBy('name');
     $roles = Role::get()->sortBy('display_name')->pluck('display_name', 'id');
     $icons = $this->icons;
     return view('profio/auth::menu.create', compact('menu', 'title', 'permissions', 'roles', 'icons'));
 }
Exemple #2
0
 public function index()
 {
     $permissions = Permission::get()->sortBy('name');
     return view('profio/auth::permission.index', compact('permissions'));
 }