62 lines
1.7 KiB
PHP
62 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\MainSection;
|
|
use App\Models\Page;
|
|
use App\Models\Post;
|
|
use App\Models\SubSection;
|
|
use App\Observers\MainSectionObserver;
|
|
use App\Observers\PageObserver;
|
|
use App\Observers\PostObserver;
|
|
use App\Observers\SubSectionObserver;
|
|
use Carbon\Carbon;
|
|
use Filament\Facades\Filament;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Facades\URL;
|
|
use Illuminate\Support\Facades\Vite;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Support\Sleep;
|
|
use Intervention\Image\Facades\Image;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
setlocale(LC_TIME, 'ru_RU.UTF-8');
|
|
Page::observe(PageObserver::class);
|
|
Post::observe(PostObserver::class);
|
|
MainSection::observe(MainSectionObserver::class);
|
|
SubSection::observe(SubSectionObserver::class);
|
|
Carbon::setLocale(config('app.locale'));
|
|
Model::preventLazyLoading(!app()->isProduction());
|
|
// URL::forceScheme('https');
|
|
self::registerFilamentNavigationGroups();
|
|
$this->loadViewsFrom(__DIR__.'/path/to/views', 'checkpoint');
|
|
}
|
|
|
|
|
|
private static function registerFilamentNavigationGroups()
|
|
{
|
|
Filament::registerNavigationGroups([
|
|
'Структура приложения',
|
|
'Структура института',
|
|
'Образование',
|
|
'Расписание и группы',
|
|
'Новости и мероприятия',
|
|
'Библиотека',
|
|
]);
|
|
}
|
|
}
|