diff --git a/app/Command/EventCommand.php b/app/Command/EventCommand.php new file mode 100644 index 0000000..69539f7 --- /dev/null +++ b/app/Command/EventCommand.php @@ -0,0 +1,35 @@ +setDescription('Create a new event class'); + + parent::configure(); + } + + protected function getStub(): string + { + return __DIR__ . '/stubs/event.stub'; + } + + protected function getDefaultNamespace(): string + { + return 'App\\Event'; + } +} diff --git a/app/Command/stubs/event.stub b/app/Command/stubs/event.stub new file mode 100644 index 0000000..400ef31 --- /dev/null +++ b/app/Command/stubs/event.stub @@ -0,0 +1,15 @@ +xxx = $xxx; + } +} diff --git a/app/Event/RegistrationEvent.php b/app/Event/RegistrationEvent.php new file mode 100644 index 0000000..9a1eacf --- /dev/null +++ b/app/Event/RegistrationEvent.php @@ -0,0 +1,18 @@ +userId = $userId; + } +} diff --git a/app/Listener/FirstRegistrationListener.php b/app/Listener/FirstRegistrationListener.php new file mode 100644 index 0000000..b7fc154 --- /dev/null +++ b/app/Listener/FirstRegistrationListener.php @@ -0,0 +1,30 @@ +