osb/app/Providers/AppServiceProvider.php
Deon George 3ff34af7f0
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 37s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
Update laravel framework from 9 to 11, removed some old packages
2024-07-04 15:03:11 +10:00

37 lines
631 B
PHP

<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
use Leenooks\Traits\SingleOrFail;
class AppServiceProvider extends ServiceProvider
{
use SingleOrFail;
/**
* Register any application services.
*/
public function register(): void
{
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
self::bootSingleOrfail();
Gate::define('wholesaler', function ($user) {
return $user->isWholesaler();
});
Gate::define('reseller', function ($user) {
return $user->isReseller();
});
}
}