Пример #1
0
 public function syncNewRoutes()
 {
     foreach ($this->routes as $route) {
         $name = $route->getName();
         if (!!$name) {
             Permission::updateOrCreate(['name' => $name, 'description' => $route->getActionName()]);
         }
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Permission::destroy($id);
     Session::flash('flash_message', 'Permission deleted!');
     return redirect('permissions');
 }