misc_pterodactyl-panel/app/Providers/AuthServiceProvider.php

30 lines
658 B
PHP
Raw Permalink 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 model to policy mappings for the application.
*/
protected $policies = [
Server::class => ServerPolicy::class,
];
2023-02-23 19:30:16 +00:00
public function boot(): void
{
Sanctum::usePersonalAccessTokenModel(ApiKey::class);
}
2022-05-22 21:01:39 +00:00
2023-02-23 19:30:16 +00:00
public function register(): void
2022-05-22 21:01:39 +00:00
{
Sanctum::ignoreMigrations();
}
}