39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Cache\RateLimiting\Limit;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Blade;
|
|
use Illuminate\Support\Facades\RateLimiter;
|
|
use Illuminate\Support\Facades\URL;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
RateLimiter::for('login', function (Request $request) {
|
|
// Coarse protection against floods; detailed failure-based limiting stays in AuthController.
|
|
return Limit::perMinute(60)->by($request->ip());
|
|
});
|
|
|
|
Blade::component('dashboard.pesanan.components.modalExport', 'modalExport');
|
|
Blade::component('dashboard.pesanan.components.infoPesanan', 'infoPesanan');
|
|
if ($this->app->environment('production')) {
|
|
URL::forceScheme('https');
|
|
}
|
|
}
|
|
}
|