App\Providers\BootServiceProvider::boot PHP Méthode

boot() public méthode

Bootstrap any application services.
public boot ( Illuminate\Http\Request $request ) : void
$request Illuminate\Http\Request
Résultat void
    public function boot(Request $request)
    {
        View::addExtension('tpl', 'blade');
        // check dotenv
        if (!file_exists(base_path('.env'))) {
            throw new PrettyPageException(trans('setup.file.no-dot-env'), -1);
        }
        try {
            // check database config
            Database::prepareConnection();
        } catch (\Exception $e) {
            throw new PrettyPageException(trans('setup.database.connection-error', ['msg' => $e->getMessage()]), $e->getCode());
        }
        // skip the installation check when setup or under CLI
        if (!$request->is('setup') && !$request->is('setup/*') && PHP_SAPI != "cli") {
            $this->checkInstallation();
        }
    }