Skip to content

Commit

Permalink
Service provider added
Browse files Browse the repository at this point in the history
  • Loading branch information
jdw5 committed Feb 11, 2024
1 parent e488c4e commit 9c7549f
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 2 deletions.
64 changes: 64 additions & 0 deletions src/ArtisanAssembleServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php

namespace Jdw5\ArtisanAssemble;

use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;
use Jdw5\ArtisanAssemble\Console\Commands\EndpointMakeCommand;
use Jdw5\ArtisanAssemble\Console\Commands\EnumMakeCommand;
use Jdw5\ArtisanAssemble\Console\Commands\FilterMakeCommand;
use Jdw5\ArtisanAssemble\Console\Commands\HashMakeCommand;
use Jdw5\ArtisanAssemble\Console\Commands\ModalMakeCommand;
use Jdw5\ArtisanAssemble\Console\Commands\PageMakeCommand;

// use Illuminate\Foundation\Console\AboutCommand;

class ArtisanAssembleServiceProvider extends ServiceProvider implements DeferrableProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}

/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{


// AboutCommand::add('My Package', fn () => ['Version' => '1.0.0']);

$this->publishes([
__DIR__.'/config/artisan-assemble.php' => config_path('artisan-assemble.php'),
// __DIR__.'../stubs/' => stub_path('artisan-assemble.php'),
]);

if ($this->app->runningInConsole()) {
$this->commands([
EndpointMakeCommand::class,
EnumMakeCommand::class,
FilterMakeCommand::class,
HashMakeCommand::class,
ModalMakeCommand::class,
PageMakeCommand::class,
]);
}
}

/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
}
}
9 changes: 9 additions & 0 deletions src/config/artisan-assemble.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

return [
'frontend' => [
'extension' => 'vue',
'modal_path' => '',
'page_path' => '',
]
];
4 changes: 2 additions & 2 deletions stubs/enum.stub
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace App\Enums;
namespace {{ namespace }};

enum {{ name }}
enum {{ class }}
{
//
}

0 comments on commit 9c7549f

Please sign in to comment.