1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 17:12:30 +01:00
Pterodactyl-Panel/app/Providers/AuthServiceProvider.php
Matthew Penner cbcf62086f
Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-14 10:59:20 -06:00

32 lines
682 B
PHP

<?php
namespace Pterodactyl\Providers;
use Laravel\Sanctum\Sanctum;
use Pterodactyl\Models\ApiKey;
use Pterodactyl\Models\Server;
use Pterodactyl\Policies\ServerPolicy;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The model to policy mappings for the application.
*/
protected $policies = [
Server::class => ServerPolicy::class,
];
public function boot()
{
Sanctum::usePersonalAccessTokenModel(ApiKey::class);
$this->registerPolicies();
}
public function register()
{
Sanctum::ignoreMigrations();
}
}