Mise en prod

This commit is contained in:
hugol
2024-11-16 11:49:20 +01:00
parent a21b69bd8f
commit 3210782a6c
38 changed files with 3486 additions and 6524 deletions

View File

@@ -2,22 +2,19 @@
namespace App\Models;
use Illuminate\Notifications\Notifiable;
use Laravel\Fortify\TwoFactorAuthenticatable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use HasFactory;
use Notifiable;
use TwoFactorAuthenticatable;
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<int, string>
*/
protected $fillable = [
'name',
@@ -26,32 +23,21 @@ class User extends Authenticatable
];
/**
* The attributes that should be hidden for arrays.
* The attributes that should be hidden for serialization.
*
* @var array
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
'two_factor_recovery_codes',
'two_factor_secret',
];
/**
* The attributes that should be cast to native types.
* The attributes that should be cast.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
/**
* The accessors to append to the model's array form.
*
* @var array
*/
// protected $appends = [
// 'profile_photo_url',
// ];
}

View File

@@ -2,6 +2,7 @@
namespace App\Providers;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@@ -19,6 +20,6 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
//
Paginator::useBootstrapFive();
}
}

View File

@@ -2,6 +2,7 @@
namespace App\Providers;
use Artesaos\SEOTools\Facades\SEOTools;
use Illuminate\Support\ServiceProvider;
use Laravel\Fortify\Fortify;
@@ -25,18 +26,24 @@ class FortifyBootstrapServiceProvider extends ServiceProvider
public function boot()
{
Fortify::loginView(function () {
SEOTools::setTitle('Connexion');
return view('auth.login');
});
/*
Fortify::registerView(function () {
SEOTools::setTitle('Inscription');
return view('auth.register');
});
Fortify::requestPasswordResetLinkView(function () {
SEOTools::setTitle('Mot de passe perdu');
return view('auth.forgot-password');
});
Fortify::resetPasswordView(function ($request) {
SEOTools::setTitle('Changer mot de passe');
return view('auth.reset-password', ['request' => $request]);
});
@@ -51,5 +58,7 @@ class FortifyBootstrapServiceProvider extends ServiceProvider
Fortify::twoFactorChallengeView(function () {
return view('auth.two-factor-challenge');
});
*/
}
}

View File

@@ -28,7 +28,7 @@ class FortifyServiceProvider extends ServiceProvider
*/
public function boot(): void
{
//Fortify::createUsersUsing(CreateNewUser::class);
Fortify::createUsersUsing(CreateNewUser::class);
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);
@@ -42,33 +42,5 @@ class FortifyServiceProvider extends ServiceProvider
RateLimiter::for('two-factor', function (Request $request) {
return Limit::perMinute(5)->by($request->session()->get('login.id'));
});
Fortify::loginView(function () {
return view('auth.login');
});
//Fortify::registerView(function () {
// return view('auth.register');
//});
Fortify::requestPasswordResetLinkView(function () {
return view('auth.forgot-password');
});
Fortify::resetPasswordView(function ($request) {
return view('auth.reset-password', ['request' => $request]);
});
// Fortify::verifyEmailView(function () {
// return view('auth.verify-email');
// });
Fortify::confirmPasswordView(function () {
return view('auth.confirm-password');
});
Fortify::twoFactorChallengeView(function () {
return view('auth.two-factor-challenge');
});
}
}