src/Provider.php
public function boot(Router $router)
    {
        if (!$this->app->routesAreCached()) {
            require __DIR__ . '/Routes/web.php';
        }

        $this->publishes([
            __DIR__ . '/Config/language.php'                                  => config_path('language.php'),
            __DIR__ . '/Migrations/2020_01_01_000000_add_locale_column.php'   => database_path('migrations/2020_01_01_000000_add_locale_column.php'),
            __DIR__ . '/Resources/views/flag.blade.php'                       => resource_path('views/vendor/language/flag.blade.php'),
            __DIR__ . '/Resources/views/flags.blade.php'                      => resource_path('views/vendor/language/flags.blade.php'),
        ], 'language');

        $router->aliasMiddleware('language', config('language.middleware'));

        $this->app->register(IdentifyServiceProvider::class);

        $this->app->singleton('language', function ($app) {
            return new Language($app);
        });
    }
public function boot(Router $router)
    {
        if (!$this->app->routesAreCached()) {
            require __DIR__ . '/Routes/web.php';
        }

        $this->publishes([
            __DIR__ . '/Config/language.php'                                  => config_path('language.php'),
            __DIR__ . '/Migrations/2020_01_01_000000_add_locale_column.php'   => database_path('migrations/2020_01_01_000000_add_locale_column.php'),
            __DIR__ . '/Resources/views/flag.blade.php'                       => resource_path('views/vendor/language/flag.blade.php'),
            __DIR__ . '/Resources/views/flags.blade.php'                      => resource_path('views/vendor/language/flags.blade.php'),
        ], 'language');

        $router->aliasMiddleware('language', config('language.middleware'));

        $this->app->register(IdentifyServiceProvider::class);

        $this->app->singleton('language', function ($app) {
            return new Language($app);
        });
    }
Bootstrap the application services.

@param Router $router

@return void