ldc-enum/src/EnumServiceProvider.php

31 lines
710 B
PHP
Raw Normal View History

2021-03-17 00:52:03 +01:00
<?php
namespace Kwaadpepper\Enum;
use Illuminate\Support\ServiceProvider;
2021-09-12 19:21:54 +02:00
use Kwaadpepper\Enum\Console\CreateEnum;
2021-03-17 00:52:03 +01:00
class EnumServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'enum');
2021-03-17 00:52:03 +01:00
$this->publishes([
__DIR__ . '/../resources/lang' => resource_path('lang/vendor/enum'),
]);
2021-09-12 19:21:54 +02:00
2023-05-30 09:27:27 +02:00
// Register the command if we are using the application via the CLI.
2021-09-12 19:21:54 +02:00
if ($this->app->runningInConsole()) {
$this->commands([
CreateEnum::class,
]);
}
2021-03-17 00:52:03 +01:00
}
}