35 lines
856 B
PHP
35 lines
856 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Auth\LegacyUserProvider;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Pagination\Paginator;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
// Lazy loading, atribut hilang, dan atribut terbuang menjadi error selama pengembangan.
|
|
Model::shouldBeStrict(! $this->app->isProduction());
|
|
|
|
Paginator::defaultView('pagination.siakad');
|
|
Paginator::defaultSimpleView('pagination.siakad');
|
|
|
|
Auth::provider('legacy', fn (): LegacyUserProvider => new LegacyUserProvider);
|
|
}
|
|
}
|