Ejemplo n.º 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Permission::destroy($id);
     $code = 200;
     $msg = json_encode(array('msg' => $code));
     return $msg;
 }
 public function destroyPermission($id)
 {
     $result = Permission::destroy($id);
     return $result;
 }
Ejemplo n.º 3
0
 /**
  * Locate module permission and delete it.
  *
  * @param $string
  */
 protected static function destroyPermission($name)
 {
     $permUseActiveDirectoryInspector = Permission::where('name', $name)->first();
     if ($permUseActiveDirectoryInspector) {
         Permission::destroy($permUseActiveDirectoryInspector->id);
     }
 }