Esempio n. 1
0
 /**
  * Remove the specified permission from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function destroy($id)
 {
     try {
         $this->permissions->destroy($id);
         return $this->redirect('permissions.index');
     } catch (ModelNotFoundException $e) {
         return $this->redirectNotFound();
     }
 }
 /**
  * Remove the specified permission from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Permission::destroy($id);
     return Redirect::route('permissions.index');
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     //
     try {
         $permission = Permission::find($id);
         $groups = Sentry::findAllGroups();
         foreach ($groups as $group) {
             if ($group->hasAccess(array($permission->name))) {
                 $group->permissions = array("{$permission->name}" => 0);
                 $group->save();
             }
         }
         Permission::destroy($id);
     } catch (Exception $e) {
     }
 }
 /**
  * Remove the specified resource from storage.
  * DELETE /permissions/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     \Permission::destroy($id);
     return \Redirect::route('admin.permissions.index');
 }