2023-03-21 19:54:30 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
2023-04-03 19:56:13 +02:00
|
|
|
use Opcodes\LogViewer\Facades\LogViewer;
|
2023-03-21 19:54:30 +01:00
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*/
|
|
|
|
public function register(): void
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
|
|
|
public function boot(): void
|
|
|
|
{
|
2023-04-03 19:56:13 +02:00
|
|
|
LogViewer::auth(function ($request) {
|
|
|
|
return $request->user()->has_admin_privileges ?? false;
|
|
|
|
});
|
2023-03-21 19:54:30 +01:00
|
|
|
}
|
|
|
|
}
|