33 lines
698 B
PHP
33 lines
698 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 policy mappings for the application.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $policies = [
|
|
Server::class => ServerPolicy::class,
|
|
];
|
|
|
|
public function boot()
|
|
{
|
|
Sanctum::usePersonalAccessTokenModel(ApiKey::class);
|
|
|
|
$this->registerPolicies();
|
|
}
|
|
|
|
public function register()
|
|
{
|
|
Sanctum::ignoreMigrations();
|
|
}
|
|
}
|