28 lines
597 B
PHP
28 lines
597 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\QrCode;
|
|
use App\Policies\QrCodePolicy;
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\Support\MobileTopbar;
|
|
use Illuminate\Support\Facades\View;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
Gate::policy(QrCode::class, QrCodePolicy::class);
|
|
View::composer(['partials.topbar', 'partials.topbar-qr'], function ($view) {
|
|
$view->with(MobileTopbar::resolve());
|
|
});
|
|
|
|
}
|
|
}
|