From b054dfa879fc92715cb96815e89c580d5ad47e99 Mon Sep 17 00:00:00 2001 From: Chris Morrell Date: Wed, 15 Nov 2023 20:16:32 -0500 Subject: [PATCH 1/2] Use LaravelPackageTools --- src/VerbsServiceProvider.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/VerbsServiceProvider.php b/src/VerbsServiceProvider.php index dba0f0f2..c2175fd4 100644 --- a/src/VerbsServiceProvider.php +++ b/src/VerbsServiceProvider.php @@ -25,6 +25,10 @@ public function configurePackage(Package $package): void $package ->name('verbs') ->hasConfigFile() + ->hasCommands( + MakeVerbEventCommand::class, + MakeVerbStateCommand::class, + ) ->hasMigrations( 'create_verb_events_table', 'create_verb_snapshots_table', @@ -72,20 +76,5 @@ public function boot() $this->app->make(Broker::class)->fire($event); } }); - - $this->commands([ - MakeVerbEventCommand::class, - MakeVerbStateCommand::class, - ]); - - $this->publishes([ - __DIR__.'/../config/verbs.php' => config_path('verbs.php'), - ], 'verbs-config'); - - $this->publishes([ - __DIR__.'/../database/migrations/create_verb_events_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_verb_events_table.php'), - __DIR__.'/../database/migrations/create_verb_state_events_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_verb_state_events_table.php'), - __DIR__.'/../database/migrations/create_verb_snapshots_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_verb_snapshots_table.php'), - ], 'verbs-migrations'); } } From 08f007cf734a706c30b5ca3c067e134013314e84 Mon Sep 17 00:00:00 2001 From: inxilpro Date: Thu, 16 Nov 2023 01:31:14 +0000 Subject: [PATCH 2/2] Fix styling --- src/VerbsServiceProvider.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/VerbsServiceProvider.php b/src/VerbsServiceProvider.php index c2175fd4..fec6f22a 100644 --- a/src/VerbsServiceProvider.php +++ b/src/VerbsServiceProvider.php @@ -25,10 +25,10 @@ public function configurePackage(Package $package): void $package ->name('verbs') ->hasConfigFile() - ->hasCommands( - MakeVerbEventCommand::class, - MakeVerbStateCommand::class, - ) + ->hasCommands( + MakeVerbEventCommand::class, + MakeVerbStateCommand::class, + ) ->hasMigrations( 'create_verb_events_table', 'create_verb_snapshots_table',