mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 12:10:41 -05:00
Adds a dynamicFormat macro/method on the Carbon facade to handle the logic of conditionally formatting the dates based on the difference to the current time. Logic pulled from #48 (Thanks Waffle!) Issue #45
29 lines
877 B
PHP
29 lines
877 B
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Application;
|
|
use Illuminate\Foundation\Configuration\Exceptions;
|
|
use Illuminate\Foundation\Configuration\Middleware;
|
|
use Illuminate\Support\Facades\Route;
|
|
use Mchev\Banhammer\Middleware\IPBanned;
|
|
|
|
return Application::configure(basePath: dirname(__DIR__))
|
|
->withRouting(
|
|
web: __DIR__.'/../routes/web.php',
|
|
api: __DIR__.'/../routes/api.php',
|
|
commands: __DIR__.'/../routes/console.php',
|
|
health: '/up',
|
|
then: function () {
|
|
Route::middleware('api')
|
|
->prefix('api/v0')
|
|
->name('api.v0.')
|
|
->group(base_path('routes/api_v0.php'));
|
|
},
|
|
)
|
|
->withMiddleware(function (Middleware $middleware) {
|
|
$middleware->append(IPBanned::class);
|
|
})
|
|
->withExceptions(function (Exceptions $exceptions) {
|
|
//
|
|
})
|
|
->create();
|