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()
|
|
|
|
|
{
|
2021-09-12 00:05:10 +02:00
|
|
|
$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
|
|
|
}
|
|
|
|
|
}
|