Change default role name method..
This commit is contained in:
parent
9802164a8c
commit
289764c1e3
@ -12,6 +12,10 @@ class UpdateRole extends Job implements ShouldUpdate
|
||||
{
|
||||
public function handle(): Role
|
||||
{
|
||||
if (in_array($this->model->name, config('roles.defaults', ['admin', 'manager', 'accountant', 'employee']))) {
|
||||
$this->request->name = $this->model->name;
|
||||
}
|
||||
|
||||
event(new RoleUpdating($this->model, $this->request));
|
||||
|
||||
\DB::transaction(function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user