New bootstrap

This commit is contained in:
Lance Pioch 2024-03-19 17:03:30 -04:00
parent 7c39c00400
commit 0ce1739b9f
2 changed files with 23 additions and 52 deletions

View File

@ -1,55 +1,21 @@
<?php <?php
/* use Illuminate\Foundation\Application;
|-------------------------------------------------------------------------- use Illuminate\Foundation\Configuration\Exceptions;
| Create The Application use Illuminate\Foundation\Configuration\Middleware;
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new Illuminate\Foundation\Application( return Application::configure(basePath: dirname(__DIR__))
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ->withProviders()
); ->withRouting(
web: __DIR__.'/../routes/web.php',
/* // api: __DIR__.'/../routes/api.php',
|-------------------------------------------------------------------------- commands: __DIR__.'/../routes/console.php',
| Bind Important Interfaces // channels: __DIR__.'/../routes/channels.php',
|-------------------------------------------------------------------------- health: '/up',
| )
| Next, we need to bind some important interfaces into the container so ->withMiddleware(function (Middleware $middleware) {
| we will be able to resolve them when needed. The kernels serve the //
| incoming requests to this application from both the web and CLI. })
| ->withExceptions(function (Exceptions $exceptions) {
*/ //
})->create();
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;

5
bootstrap/providers.php Normal file
View File

@ -0,0 +1,5 @@
<?php
return [
App\Providers\AppServiceProvider::class,
];