This commit is contained in:
mohanmd 2026-05-15 17:46:36 +05:30
parent 452c1f909c
commit d21c5c79b1
4 changed files with 38 additions and 1 deletions

3
api/index.php Normal file
View File

@ -0,0 +1,3 @@
<?php
// api/index.php
require __DIR__ . '/../public/index.php';

View File

@ -19,6 +19,8 @@ public function register(): void
*/
public function boot(): void
{
//
if (config('app.env') === 'production') {
\Illuminate\Support\Facades\URL::forceScheme('https');
}
}
}

View File

@ -11,6 +11,7 @@
health: '/up',
)
->withMiddleware(function (Middleware $middleware): void {
$middleware->trustProxies(at: '*');
$middleware->web(append: [
\App\Http\Middleware\HandleInertiaRequests::class,
]);

31
vercel.json Normal file
View File

@ -0,0 +1,31 @@
{
"version": 2,
"framework": "laravel",
"functions": {
"api/*.php": {
"runtime": "vercel-php@0.7.2"
}
},
"routes": [
{
"src": "/build/(.*)",
"dest": "/public/build/$1"
},
{
"src": "/(css|js|images|fonts)/(.*)",
"dest": "/public/$1/$2"
},
{
"src": "/favicon.ico",
"dest": "/public/favicon.ico"
},
{
"src": "/robots.txt",
"dest": "/public/robots.txt"
},
{
"src": "/(.*)",
"dest": "/api/index.php"
}
]
}