Skip to content

Commit 14ae968

Browse files
committed
ITT: Fixture service provider added.
1 parent ce2d082 commit 14ae968

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
use Illuminate\Foundation\AliasLoader;
4+
5+
class FixtureServiceProvider extends \Illuminate\Support\ServiceProvider
6+
{
7+
public function register()
8+
{
9+
$this->registerAliases();
10+
$this->registerCommands();
11+
}
12+
13+
private function registerAliases()
14+
{
15+
$this->app->booting(function () {
16+
$loader = AliasLoader::getInstance();
17+
$loader->alias('Fixture\Alias\Post', Post::class);
18+
});
19+
}
20+
21+
private function registerCommands()
22+
{
23+
$this->app->singleton('command.fixture.generic', GenericCommand::class);
24+
25+
$this->commands(['command.fixture.generic']);
26+
}
27+
}

0 commit comments

Comments
 (0)