/
BespredeL
/
geo-restrict
Обзор
Документация
Войти
/
BespredeL
/
geo-restrict
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
1
Аналитика
Безопасность
master
src/GeoRestrictServiceProvider.php
47 строк
1 KB
Aleksandr Kireev
fix:
08 фев 2026, 11:29
08 фев 2026, 11:29
cb08a6e
Код
Авторство
О чём код?
<?php declare(strict_types=1); namespace Bespredel\GeoRestrict; use Illuminate\Support\ServiceProvider; use Bespredel\GeoRestrict\Middleware\RestrictAccessByGeo; use Bespredel\GeoRestrict\Console\ClearGeoCache; class GeoRestrictServiceProvider extends ServiceProvider { /** * Bootstrap the application services. * * @return void */ public function boot(): void { $this->mergeConfigFrom(__DIR__ . '/../config/geo-restrict.php', 'geo-restrict'); $this->publishes([ __DIR__ . '/../config/geo-restrict.php' => config_path('geo-restrict.php'), ], 'geo-restrict-config'); $this->publishes([ __DIR__ . '/../resources/lang' => resource_path('lang/vendor/geo-restrict'), ], 'geo-restrict-lang'); $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'geo-restrict'); app('router')->aliasMiddleware('geo-restrict', RestrictAccessByGeo::class); $this->commands([ ClearGeoCache::class, ]); } /** * Register the application services. * * @return void */ public function register(): void { } }