forge/bootstrap/app.php
Refringe 0e3783555e
Basic API
Includes routes for login, logout, listing users, listing mods, listing a user, and listing a mod. Very basic, just laying out the structure.

https://www.postman.com/refringe/workspace/spt-forge
2024-06-27 16:58:11 -04:00

28 lines
872 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();