29 lines
658 B
PHP
29 lines
658 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(): void
|
|
{
|
|
Sanctum::usePersonalAccessTokenModel(ApiKey::class);
|
|
}
|
|
|
|
public function register(): void
|
|
{
|
|
Sanctum::ignoreMigrations();
|
|
}
|
|
}
|