Пример #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $modules = Module::all();
     $permistions = Permistion::all();
     $model = Group::find($id);
     return View::make("CoreCms::group.edit")->with("model", $model)->with("modules", $modules)->with("permistions", $permistions);
 }
Пример #2
0
 private function hasPermistionAccesModule($user, $moduleAlias)
 {
     $permistions = \H0akd\Corecms\Models\Permistion::all();
     foreach ($permistions as $permistion) {
         if ($user->hasAccess("{$moduleAlias}.{$permistion->alias}")) {
             return true;
         }
     }
     return false;
 }