31 lines
749 B
PHP
31 lines
749 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Http\Responses\RegisterResponse;
|
|
use Illuminate\Cache\RateLimiting\Limit;
|
|
use Illuminate\Support\Facades\RateLimiter;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Laravel\Fortify\Contracts\RegisterResponse as RegisterResponseContract;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
$this->app->singleton(RegisterResponseContract::class, RegisterResponse::class);
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
RateLimiter::for('emails', function (object $job): Limit {
|
|
return Limit::perSecond(1);
|
|
});
|
|
}
|
|
}
|