forked from eatvio/eatvio-infra
34 lines
756 B
PHP
34 lines
756 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Plan;
|
|
use App\Models\Recipe;
|
|
use App\Policies\PlanPolicy;
|
|
use App\Policies\RecipePolicy;
|
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
|
|
class AuthServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* The policy mappings for the application.
|
|
*
|
|
* @var array<class-string, class-string>
|
|
*/
|
|
protected $policies = [
|
|
Plan::class => PlanPolicy::class,
|
|
Recipe::class => RecipePolicy::class,
|
|
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
|
];
|
|
|
|
/**
|
|
* Register any authentication / authorization services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
$this->registerPolicies();
|
|
}
|
|
}
|