src/UnisysApiServiceProvider.php
public function boot()
    {
        Route::patterns([
            'id'    => '^\d+$',
            'model' => '^\d+$',
        ]);

        $this->app->register(RouteServiceProvider::class);
        $this->app->register(AuthServiceProvider::class);
        $this->app->register(ScheduleServiceProvider::class);
        $this->app->register(MiddlewareServiceProvider::class);

        $this->commands([
            UnisysApiInitializeEnv::class,
            UnisysApiInstall::class,
            ImportUsers::class,
            PermissionsSync::class,
            SetCompanyProfile::class,
            Update::class,
        ]);

        if ($this->app->runningInConsole()) {
            $timestamp = date('Y_m_d_His', time());

            if (!class_exists('CreateUsersTable')) {
                $this->publishes([
                    __DIR__ . '/../database/migrations/create_users_table.php.stub' => database_path("/migrations/{$timestamp}_create_users_table.php"),
                ], 'migrations');
            }

            if (!class_exists('CreatePasswordResetsTable')) {
                $this->publishes([
                    __DIR__ . '/../database/migrations/create_password_resets_table.php.stub' => database_path("/migrations/{$timestamp}_create_password_resets_table.php"),
                ], 'migrations');
            }

            if (!class_exists('CreateInstalledModulesTable')) {
                $this->publishes([
                    __DIR__ . '/../database/migrations/create_installed_modules_table.php.stub' => database_path("/migrations/{$timestamp}_create_installed_modules_table.php"),
                ], 'migrations');
            }

            if (!class_exists('CreateSettingsTable')) {
                $this->publishes([
                    __DIR__ . '/../database/migrations/create_settings_table.php.stub' => database_path("/migrations/{$timestamp}_create_settings_table.php"),
                ], 'migrations');
            }

            $this->publishes([
                __DIR__ . '/../config/query-filter.php' => config_path('query-filter.php'),
            ], 'config');
        }
    }
public function boot()
    {
        Route::patterns([
            'id'    => '^\d+$',
            'model' => '^\d+$',
        ]);

        $this->app->register(RouteServiceProvider::class);
        $this->app->register(AuthServiceProvider::class);
        $this->app->register(ScheduleServiceProvider::class);
        $this->app->register(MiddlewareServiceProvider::class);

        $this->commands([
            UnisysApiInitializeEnv::class,
            UnisysApiInstall::class,
            ImportUsers::class,
            PermissionsSync::class,
            SetCompanyProfile::class,
            Update::class,
        ]);

        if ($this->app->runningInConsole()) {
            $timestamp = date('Y_m_d_His', time());

            if (!class_exists('CreateUsersTable')) {
                $this->publishes([
                    __DIR__ . '/../database/migrations/create_users_table.php.stub' => database_path("/migrations/{$timestamp}_create_users_table.php"),
                ], 'migrations');
            }

            if (!class_exists('CreatePasswordResetsTable')) {
                $this->publishes([
                    __DIR__ . '/../database/migrations/create_password_resets_table.php.stub' => database_path("/migrations/{$timestamp}_create_password_resets_table.php"),
                ], 'migrations');
            }

            if (!class_exists('CreateInstalledModulesTable')) {
                $this->publishes([
                    __DIR__ . '/../database/migrations/create_installed_modules_table.php.stub' => database_path("/migrations/{$timestamp}_create_installed_modules_table.php"),
                ], 'migrations');
            }

            if (!class_exists('CreateSettingsTable')) {
                $this->publishes([
                    __DIR__ . '/../database/migrations/create_settings_table.php.stub' => database_path("/migrations/{$timestamp}_create_settings_table.php"),
                ], 'migrations');
            }

            $this->publishes([
                __DIR__ . '/../config/query-filter.php' => config_path('query-filter.php'),
            ], 'config');
        }
    }
public function boot ( ) { Route :: patterns ( [ 'id' => '^\d+$' , 'model' => '^\d+$' , ] ) ; $ this -> app -> register ( RouteServiceProvider :: class ) ; $ this -> app -> register ( AuthServiceProvider :: class ) ; $ this -> app -> register ( ScheduleServiceProvider :: class ) ; $ this -> app -> register ( MiddlewareServiceProvider :: class ) ; $ this -> commands ( [ UnisysApiInitializeEnv :: class , UnisysApiInstall :: class , ImportUsers :: class , PermissionsSync :: class , SetCompanyProfile :: class , Update :: class , ] ) ; if ( $ this -> app -> runningInConsole ( ) ) { $ timestamp = date ( 'Y_m_d_His' , time ( ) ) ; if ( ! class_exists ( 'CreateUsersTable' ) ) { $ this -> publishes ( [ __DIR__ . '/../database/migrations/create_users_table.php.stub' => database_path ( "/migrations/{$timestamp}_create_users_table.php" ) , ] , 'migrations' ) ; } if ( ! class_exists ( 'CreatePasswordResetsTable' ) ) { $ this -> publishes ( [ __DIR__ . '/../database/migrations/create_password_resets_table.php.stub' => database_path ( "/migrations/{$timestamp}_create_password_resets_table.php" ) , ] , 'migrations' ) ; } if ( ! class_exists ( 'CreateInstalledModulesTable' ) ) { $ this -> publishes ( [ __DIR__ . '/../database/migrations/create_installed_modules_table.php.stub' => database_path ( "/migrations/{$timestamp}_create_installed_modules_table.php" ) , ] , 'migrations' ) ; } if ( ! class_exists ( 'CreateSettingsTable' ) ) { $ this -> publishes ( [ __DIR__ . '/../database/migrations/create_settings_table.php.stub' => database_path ( "/migrations/{$timestamp}_create_settings_table.php" ) , ] , 'migrations' ) ; } $ this -> publishes ( [ __DIR__ . '/../config/query-filter.php' => config_path ( 'query-filter.php' ) , ] , 'config' ) ; } }
Bootstrap any application services.

@return void
Bootstrap any application services .