File: /var/www/BtPayments/BtPayments-platform/bootstrap/app.php
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Support\Facades\Route;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
commands: __DIR__.'/../routes/console.php',
health: 'up',
using: function () {
Route::prefix('coinpal')
->namespace('\\App\\Http\\Controllers\\CoinPal')
->withoutMiddleware([\Illuminate\Foundation\Http\Middleware\ValidateCsrfToken::class])
->group(base_path('routes/web-coinpal.php'));
Route::prefix('gateway/payments')
->namespace('\\App\\Http\\Controllers\\Gateway')
->name('gateway.payments.')
->withoutMiddleware(['web', 'auth', 'auth:web'])
->group(base_path('routes/web-gateway-payments.php'));
Route::namespace('\\App\\Http\\Controllers')
->middleware(['web'])
->group(base_path('routes/web.php'));
if (request()->getHost() === config('platform.portal_domain')) {
Route::namespace('\\App\\Http\\Controllers')
->middleware(['web'])
->group(base_path('routes/web-portal.php'));
}
if (request()->getHost() === config('platform.admin_domain')) {
Route::namespace('\\App\\Http\\Controllers')
->middleware(['web'])
->group(base_path('routes/web-admin.php'));
}
if (env('APP_ENV') === 'local') {
Route::namespace('\\App\\Http\\Controllers')
->middleware(['web'])
->group(base_path('routes/dev.php'));
}
},
)
->withCommands([
__DIR__ . '/../app/Console/Commands',
])
->withMiddleware(function (Middleware $middleware) {
//
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();