/** * Display a listing of the resource. * * @return Response */ public function index() { // $permissions = $this->role->permission(); //获取所有权限许可 return view('back.permission.index', compact('permissions')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { // $role = $this->role->edit($id); $permissions = $this->role->permission(); $cans = $this->role->getRoleCans($role); return view('back.role.edit', compact('role', 'permissions', 'cans')); }