add missing listener files
This commit is contained in:
parent
78cd6d3328
commit
68039f6a5a
@ -14,7 +14,7 @@ before_install:
|
|||||||
before_script:
|
before_script:
|
||||||
- cp .env.travis .env
|
- cp .env.travis .env
|
||||||
- composer self-update
|
- composer self-update
|
||||||
- composer update --no-interaction
|
- composer install --no-interaction
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- php artisan database:create --reset
|
- php artisan database:create --reset
|
||||||
|
2
Makefile
2
Makefile
@ -11,7 +11,6 @@ all: build
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
@composer install --no-interaction
|
@composer install --no-interaction
|
||||||
@php artisan optimize
|
|
||||||
@php artisan config:cache
|
@php artisan config:cache
|
||||||
@make db
|
@make db
|
||||||
|
|
||||||
@ -22,7 +21,6 @@ install: db
|
|||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@php artisan cache:clear
|
@php artisan cache:clear
|
||||||
@php artisan optimize
|
|
||||||
@php artisan route:clear
|
@php artisan route:clear
|
||||||
@php artisan config:clear
|
@php artisan config:clear
|
||||||
|
|
||||||
|
@ -36,5 +36,6 @@ class Kernel extends ConsoleKernel
|
|||||||
protected function commands()
|
protected function commands()
|
||||||
{
|
{
|
||||||
require base_path('routes/console.php');
|
require base_path('routes/console.php');
|
||||||
|
$this->load(__DIR__ . '/Commands');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,12 +43,12 @@
|
|||||||
"makinacorpus/php-bloom": "dev-master",
|
"makinacorpus/php-bloom": "dev-master",
|
||||||
"hashids/hashids": "2.0.*",
|
"hashids/hashids": "2.0.*",
|
||||||
"maatwebsite/excel": "2.1.*",
|
"maatwebsite/excel": "2.1.*",
|
||||||
"phpunit/phpunit": "6.4.0",
|
|
||||||
"scriptfusion/phpunit-immediate-exception-printer": "1.3.0",
|
"scriptfusion/phpunit-immediate-exception-printer": "1.3.0",
|
||||||
"nwidart/laravel-modules": "^2.6",
|
"nwidart/laravel-modules": "^2.6",
|
||||||
"sebastiaanluca/laravel-helpers": "^1.0"
|
"sebastiaanluca/laravel-helpers": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "6.4.0",
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
"mockery/mockery": "0.9.*",
|
"mockery/mockery": "0.9.*",
|
||||||
"laravel/homestead": "v6.2.2",
|
"laravel/homestead": "v6.2.2",
|
||||||
@ -81,17 +81,16 @@
|
|||||||
"php artisan key:generate"
|
"php artisan key:generate"
|
||||||
],
|
],
|
||||||
"post-install-cmd": [
|
"post-install-cmd": [
|
||||||
"Illuminate\\Foundation\\ComposerScripts::postInstall",
|
"Illuminate\\Foundation\\ComposerScripts::postInstall"
|
||||||
"php artisan optimize"
|
|
||||||
],
|
],
|
||||||
"post-update-cmd": [
|
"post-update-cmd": [
|
||||||
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
|
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
|
||||||
"php artisan ide-helper:generate",
|
"php artisan ide-helper:generate",
|
||||||
"php artisan ide-helper:meta",
|
"php artisan ide-helper:meta"
|
||||||
"php artisan optimize"
|
|
||||||
],
|
],
|
||||||
"post-autoload-dump": [
|
"post-autoload-dump": [
|
||||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump"
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
|
"@php artisan package:discover"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
|
2
composer.lock
generated
2
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "0cb626a4524ce3b7000623610d46d686",
|
"content-hash": "3e47acb2e2222b8dcae3c9c95100b4da",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "anlutro/l4-settings",
|
"name": "anlutro/l4-settings",
|
||||||
|
3
modules/.gitignore
vendored
3
modules/.gitignore
vendored
@ -1,6 +1,5 @@
|
|||||||
# Ignore everything so if we update via git, nothing is overwritten
|
# Ignore everything so if we update via git, nothing is overwritten
|
||||||
*
|
|
||||||
|
|
||||||
# But keep the sample and this file around
|
# But keep the sample and this file around
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!Sample/*
|
!/Sample/
|
||||||
|
16
modules/Sample/Listeners/TestEventListener.php
Normal file
16
modules/Sample/Listeners/TestEventListener.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Sample\Listeners;
|
||||||
|
|
||||||
|
use App\Events\TestEvent;
|
||||||
|
use Log;
|
||||||
|
|
||||||
|
class TestEventListener
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*/
|
||||||
|
public function handle(TestEvent $event) {
|
||||||
|
Log::info('Received event', [$event]);
|
||||||
|
}
|
||||||
|
}
|
25
modules/Sample/Providers/EventServiceProvider.php
Normal file
25
modules/Sample/Providers/EventServiceProvider.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Sample\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
|
class EventServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The event listener mappings for the application.
|
||||||
|
*/
|
||||||
|
protected $listen = [
|
||||||
|
'App\Events\TestEvent' => [
|
||||||
|
'Modules\Sample\Listeners\TestEventListener',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register any events for your application.
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user