public function index_onDelete()
 {
     if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) {
         foreach ($checkedIds as $permissionId) {
             if (!($permission = Permission::find($permissionId))) {
                 continue;
             }
             $permission->delete();
         }
         Flash::success('The permission has been deleted successfully.');
     }
     return $this->listRefresh();
 }
Beispiel #2
0
 public function getPermissionOptions()
 {
     return [0 => '- none required -'] + Permission::orderBy('name')->lists('name', 'name');
 }