misc_pterodactyl-panel/app/Providers/AuthServiceProvider.php

34 lines
698 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Providers;
use Laravel\Sanctum\Sanctum;
use Pterodactyl\Models\ApiKey;
2022-06-26 20:21:07 +00:00
use Pterodactyl\Models\Server;
use Pterodactyl\Policies\ServerPolicy;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
Server::class => ServerPolicy::class,
];
2017-04-01 21:59:43 +00:00
public function boot()
{
Sanctum::usePersonalAccessTokenModel(ApiKey::class);
2017-04-01 21:59:43 +00:00
$this->registerPolicies();
}
2022-05-22 21:01:39 +00:00
public function register()
{
Sanctum::ignoreMigrations();
}
}