| 1 | <?php |
||
| 14 | class TestimonialsServiceProvider extends ServiceProvider |
||
| 15 | { |
||
| 16 | use ConsoleTools; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The commands to be registered. |
||
| 20 | * |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $commands = [ |
||
| 24 | MigrateCommand::class => 'command.rinvex.testimonials.migrate', |
||
| 25 | PublishCommand::class => 'command.rinvex.testimonials.publish', |
||
| 26 | RollbackCommand::class => 'command.rinvex.testimonials.rollback', |
||
| 27 | ]; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritdoc} |
||
| 31 | */ |
||
| 32 | public function register() |
||
| 33 | { |
||
| 34 | // Merge config |
||
| 35 | $this->mergeConfigFrom(realpath(__DIR__.'/../../config/config.php'), 'rinvex.testimonials'); |
||
| 36 | |||
| 37 | // Bind eloquent models to IoC container |
||
| 38 | $this->app->singleton('rinvex.testimonials.testimonial', $testimonialModel = $this->app['config']['rinvex.testimonials.models.testimonial']); |
||
| 39 | $testimonialModel === Testimonial::class || $this->app->alias('rinvex.testimonials.testimonial', Testimonial::class); |
||
| 40 | |||
| 41 | // Register console commands |
||
| 42 | $this->registerCommands($this->commands); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | public function boot() |
||
| 55 | } |
||
| 56 |