Skip to content

Commit

Permalink
Setting seeder added
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed Oct 17, 2023
1 parent bd50a21 commit c63a954
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
| This value will be used to across system where model is needed
*/
'role_model' => \Fintech\Auth\Models\Role::class,

'default_roles_customer' => [],
/*
|--------------------------------------------------------------------------
| Team Model
Expand Down
16 changes: 16 additions & 0 deletions src/Http/Controllers/MobileVerificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,20 @@ public function store(Request $request): JsonResponse|RedirectResponse

return response()->json(['status' => 'verification-link-sent']);
}

/**
* Send a new email verification notification.
* @param Request $request
* @return JsonResponse|RedirectResponse
*/
public function update(Request $request): JsonResponse|RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(RouteServiceProvider::HOME);
}

$request->user()->sendEmailVerificationNotification();

return response()->json(['status' => 'verification-link-sent']);
}
}
2 changes: 1 addition & 1 deletion src/Services/UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private function formatUserDataFromInput($inputs)
$data['fcm_token'] = $inputs['fcm_token'] ?? null;
$data['language'] = $inputs['language'] ?? null;
$data['currency'] = $inputs['currency'] ?? null;
$data['roles'] = $inputs['roles'] ?? [];
$data['roles'] = $inputs['roles'] ?? config('fintech.auth.default_roles_customer', []);

return $data;
}
Expand Down

0 comments on commit c63a954

Please sign in to comment.