-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOctaneBundle.php
41 lines (36 loc) · 1.08 KB
/
OctaneBundle.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
40
41
<?php
declare(strict_types=1);
namespace Pandawa\Bundle\OctaneBundle;
use Laravel\Octane\OctaneServiceProvider;
use Pandawa\Bundle\FoundationBundle\Plugin\RegisterBundlesPlugin;
use Pandawa\Component\Foundation\Bundle\Bundle;
use Pandawa\Contracts\Foundation\HasPluginInterface;
/**
* @author Iqbal Maulana <iq.bluejack@gmail.com>
*/
class OctaneBundle extends Bundle implements HasPluginInterface
{
public function boot(): void
{
// Register fake view engine resolver if not exists
$this->app->booted(function () {
if (!$this->app->bound('view.engine.resolver')) {
$this->app->singleton('view.engine.resolver', function () {
return new class {
public function forget(string $engine): void
{
}
};
});
}
});
}
public function plugins(): array
{
return [
new RegisterBundlesPlugin([
OctaneServiceProvider::class,
]),
];
}
}