Esempio n. 1
0
| incoming requests to this application from both the web and CLI.
|
*/
$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);
/*
|--------------------------------------------------------------------------
| Bind the Public Path
|--------------------------------------------------------------------------
|
| On shared hostings we want to change the public path. As this
| is somewhat hardcoded in the $app->publicPath method we give
| the option to set an env constant to change this if necessary
|
*/
$app->bind('path.public', function (Illuminate\Foundation\Application $app) {
    // don't ask - in some cases the config is not yet fully loaded at this point
    return $app->config->get('typicms.public_path') ?: env('PUBLIC_PATH') ?: $app->publicPath();
});
/*
|--------------------------------------------------------------------------
| 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;