Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Dec 11, 2021
1 parent a8f8586 commit 3ddd868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Containers/AppSection/User/Actions/CreateAdminAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class CreateAdminAction extends Action
*/
public function run(array $data): User
{
DB::beginTransaction();

try {
DB::beginTransaction();

$admin = app(CreateUserByCredentialsTask::class)->run($data);
app(AssignRolesToUserTask::class)->run($admin, [config('appSection-authorization.admin_role')]);
$admin->email_verified_at = now();
Expand Down

0 comments on commit 3ddd868

Please sign in to comment.