EscolaLMS/Tags

View on GitHub
src/AuthServiceProvider.php

Summary

Maintainability
A
0 mins
Test Coverage
C
75%
<?php


namespace EscolaLms\Tags;

use EscolaLms\Tags\Models\Tag;
use EscolaLms\Tags\Policies\TagPolicy;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Laravel\Passport\Passport;

class AuthServiceProvider extends ServiceProvider
{
    protected $policies = [
        Tag::class => TagPolicy::class,
    ];

    public function boot(): void
    {
        $this->registerPolicies();

        if (! $this->app->routesAreCached() && method_exists(Passport::class, 'routes')) {
            Passport::routes();
        }
    }
}