Beispiel #1
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     if (Auth::check() && $this->rolechucnangs && $this->rolechucnangs->Them == 1) {
         $roles = Role::all();
         $chucnangs = Danhmucchucnang::all();
         $rolechucnangs = RoleChucnang::get();
         //echo '<pre>';
         //print_r($rolechucnangs);
         return view('role.create')->with(array('menus' => $this->menus, 'roles' => $roles, 'chucnangs' => $chucnangs, 'rolechucnangs' => $rolechucnangs));
     } else {
         return \Redirect::route('role.index')->with('message-error', 'Không có quyền truy cập');
     }
 }