26 lines
542 B
PHP
26 lines
542 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Pagination\Paginator;
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
// Super Admin mempunyai akses penuh kepada semua kebenaran.
|
|
Gate::before(function ($user, $ability) {
|
|
return $user->hasRole('Super Admin') ? true : null;
|
|
});
|
|
|
|
Paginator::useBootstrapFive();
|
|
}
|
|
}
|