updated permissions
This commit is contained in:
parent
8f47f40b03
commit
83f7073b18
31 changed files with 1467 additions and 901 deletions
|
|
@ -4,6 +4,7 @@ namespace App\Providers;
|
|||
|
||||
use App\Models\Interfaces\MovieDbInterface;
|
||||
use App\Services\OmdbService;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
|
|
@ -15,6 +16,14 @@ class AppServiceProvider extends ServiceProvider
|
|||
public function register(): void
|
||||
{
|
||||
$this->app->bind(MovieDbInterface::class, OmdbService::class);
|
||||
|
||||
Blade::directive('role', function ($role) {
|
||||
return "<?php if(auth()->user()->hasRole({$role})) : ?>";
|
||||
});
|
||||
|
||||
Blade::directive('endrole', function ($role) {
|
||||
return "<?php endif; ?>";
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue