Files
porint-site/bootstrap/app.php
T
Meghdad a8e79bd567
Checks / verify (push) Canceled after 0s
add no index
2026-11-26 12:42:49 +03:30

26 lines
959 B
PHP

<?php
use App\Http\Middleware\NoIndexStudio;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
then: fn () => Route::group([], base_path('routes/studio.php')),
)
->withMiddleware(function (Middleware $middleware): void {
$middleware->append(NoIndexStudio::class);
$middleware->redirectGuestsTo(fn () => route('filament.studio.auth.login'));
})
->withExceptions(function (Exceptions $exceptions): void {
$exceptions->shouldRenderJsonWhen(
fn (Request $request) => $request->is('api/*') || $request->expectsJson(),
);
})->create();