mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
42 lines
985 B
PHP
42 lines
985 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Laravel\Sanctum\Sanctum;
|
|
use Illuminate\Cache\RateLimiting\Limit;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\RateLimiter;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
Sanctum::ignoreMigrations();
|
|
Schema::defaultStringLength(191);
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
if (!file_exists(storage_path('framework/sessions'))) {
|
|
mkdir(storage_path('framework/sessions'), 0777, true);
|
|
}
|
|
|
|
//From Shipping Portal
|
|
// RateLimiter::for('api', function (Request $request) {
|
|
// return Limit::perMinute(300)->by($request->user()?->id ?: $request->ip());
|
|
// });
|
|
}
|
|
}
|