| Server IP : 13.235.167.51 / Your IP : 216.73.217.116 Web Server : Apache System : Linux machinox-server 6.17.0-1013-aws #13~24.04.1-Ubuntu SMP Fri Apr 24 21:36:58 UTC 2026 aarch64 User : root ( 0) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/app.machinox.in/bootstrap/ |
Upload File : |
<?php
use App\Exceptions\Handler;
use App\Http\Middleware\VerifyCsrfToken;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Route;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
commands: __DIR__ . '/../routes/console.php',
health: '/up',
using: function () {
Route::middleware('web')
->group(base_path('routes/web.php'));
Route::middleware('api')
->prefix('api')
->group(base_path('routes/api.php'));
Route::middleware(['api'])
->prefix('admin')
->group(base_path('routes/admin.php'));
},
)
->withMiddleware(function (Middleware $middleware) {})
->withExceptions(function (Exceptions $exceptions) {
$exceptions->renderable(function (Exception $e, $request) {
if ($request->expectsJson()) {
$status = $e instanceof HttpExceptionInterface
? $e->getStatusCode()
: Response::HTTP_INTERNAL_SERVER_ERROR;
return response()->json([
'status' => false,
'message' => $e->getMessage(),
], $status);
}
// Let Laravel handle non-JSON (web) exceptions
return null;
});
})->create();