34 lines
887 B
PHP
34 lines
887 B
PHP
<?php
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
use Illuminate\Support\Facades\Gate;
|
|
use App\Models\Artwork;
|
|
use App\Models\ArtworkAward;
|
|
use App\Models\ArtworkComment;
|
|
use App\Policies\ArtworkPolicy;
|
|
use App\Policies\ArtworkAwardPolicy;
|
|
use App\Policies\ArtworkCommentPolicy;
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* The policy mappings for the application.
|
|
*
|
|
* @var array<class-string, class-string>
|
|
*/
|
|
protected $policies = [
|
|
Artwork::class => ArtworkPolicy::class,
|
|
ArtworkAward::class => ArtworkAwardPolicy::class,
|
|
ArtworkComment::class => ArtworkCommentPolicy::class,
|
|
];
|
|
|
|
/**
|
|
* Register any authentication / authorization services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->registerPolicies();
|
|
}
|
|
}
|