Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
add-email-verification
Browse files Browse the repository at this point in the history
  • Loading branch information
FemiNoviaLina committed May 10, 2022
1 parent 3001fb4 commit 9e50738
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;

class User extends Authenticatable
class User extends Authenticatable implements MustVerifyEmail
{
use HasApiTokens, HasFactory, Notifiable;

Expand Down
6 changes: 6 additions & 0 deletions public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,9 @@ select {
.inline-flex {
display: inline-flex;
}
.table {
display: table;
}
.grid {
display: grid;
}
Expand Down Expand Up @@ -959,6 +962,9 @@ select {
.whitespace-nowrap {
white-space: nowrap;
}
.break-all {
word-break: break-all;
}
.rounded-md {
border-radius: 0.375rem;
}
Expand Down
6 changes: 0 additions & 6 deletions resources/views/auth/verify-email.blade.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<x-guest-layout>
<x-auth-card>
<x-slot name="logo">
<a href="/">
<x-application-logo class="w-20 h-20 fill-current text-gray-500" />
</a>
</x-slot>

<div class="mb-4 text-sm text-gray-600">
{{ __('Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.') }}
</div>
Expand Down
6 changes: 4 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth'])->name('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');

require __DIR__.'/auth.php';

Expand All @@ -33,6 +33,8 @@

Route::get('/about', [BasicViewController::class, 'about']);

Route::get('/rent/car/{id}', [RentController::class, 'carFormView']);
Route::middleware(['auth', 'verified'])-> group(function () {
Route::get('/rent/car/{id}', [RentController::class, 'carFormView']);
});

Route::fallback([BasicViewController::class, 'fallback']);

0 comments on commit 9e50738

Please sign in to comment.