Added user create and update events..
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
namespace App\Jobs\Auth;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Events\Auth\UserUpdated;
|
||||
use App\Events\Auth\UserUpdating;
|
||||
use App\Models\Auth\User;
|
||||
|
||||
class UpdateUser extends Job
|
||||
@ -38,6 +40,8 @@ class UpdateUser extends Job
|
||||
unset($this->request['password_confirmation']);
|
||||
}
|
||||
|
||||
event(new UserUpdating($this->user, $this->request));
|
||||
|
||||
\DB::transaction(function () {
|
||||
$this->user->update($this->request->input());
|
||||
|
||||
@ -73,6 +77,8 @@ class UpdateUser extends Job
|
||||
}
|
||||
});
|
||||
|
||||
event(new UserUpdated($this->user, $this->request));
|
||||
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user