/**
  * Show the application dashboard.
  *
  * @return \Illuminate\Http\Response
  */
 public function conpage()
 {
     // 		Auth::user()->
     // 		$roles = Role::select('id')->groupBy('id')->get();
     $roles = Role::get();
     $permissions = Permission::get();
     // 		$roleperms = $roles->permissions->lists('id')->toArray();
     // 		$role = Role::findOrFail(5);
     // 		dd($role->permissions->lists('id'));
     return view('control')->withRoles($roles)->withPermissions($permissions);
     // 		->withRoleperms($roleperms);
     //<a href="#" class="list-group-item {{in_array($perm->id, $role->permissions->id) ? 'active' : ""}} ">{{ $perm->name }}</a>
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $permissions = Permission::get();
     return view('access.permission.index')->withPermissions($permissions);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $role = Role::findOrFail($id);
     $permissions = Permission::get();
     return view("access.role.edit")->withRole($role)->withPerms($permissions);
 }