Single-auth Mutltitrust (Controller)
Roles master
Attaching, Detaching and Syncing Roles (user)
|
- tips-1use App\User;use Code4mk\Multitrust\Models\Role;public function update(Request $request, $id){$user = User::find($id);$roles = $request->roles;$user->update();$user->attachRole($roles);}
Permissions master
- Attaching, Detaching and Syncing Permissions (users, roles)
users+permissions
|
- tips-1use App\User;use Code4mk\Multitrust\Models\Permission;public function update(Request $request, $id){$user = User::find($id);$permission = $request->permission;$user->update();$user->attachPermission($permission);}
roles+permissions
|
- tips-1
|
Powered by:
@code4mk