-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAuthBundle.php
39 lines (33 loc) · 1.08 KB
/
AuthBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
namespace Pandawa\Bundle\AuthBundle;
use Illuminate\Auth\AuthManager;
use Illuminate\Auth\AuthServiceProvider;
use Illuminate\Contracts\Auth\Factory;
use Pandawa\Bundle\FoundationBundle\Plugin\ImportConfigurationPlugin;
use Pandawa\Bundle\FoundationBundle\Plugin\RegisterBundlesPlugin;
use Pandawa\Bundle\RoutingBundle\Plugin\ImportMiddlewareAnnotationPlugin;
use Pandawa\Component\Foundation\Bundle\Bundle;
use Pandawa\Contracts\Foundation\HasPluginInterface;
/**
* @author Iqbal Maulana <iq.bluejack@gmail.com>
*/
class AuthBundle extends Bundle implements HasPluginInterface
{
const POLICY_CONFIG_KEY = 'pandawa.policies';
public function configure(): void
{
$this->app->alias('auth', Factory::class);
$this->app->alias('auth', AuthManager::class);
}
public function plugins(): array
{
return [
new RegisterBundlesPlugin([
AuthServiceProvider::class,
]),
new ImportConfigurationPlugin(),
new ImportMiddlewareAnnotationPlugin(),
];
}
}