swap the modules
This commit is contained in:
5
modules/vacentral/Config/config.php
Normal file
5
modules/vacentral/Config/config.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'vacentral'
|
||||
];
|
||||
18
modules/vacentral/Listeners/PirepAcceptedEventListener.php
Normal file
18
modules/vacentral/Listeners/PirepAcceptedEventListener.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Vacentral\Listeners;
|
||||
|
||||
use Log;
|
||||
use App\Events\PirepAccepted;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
|
||||
class PirepAcceptedEventListener implements ShouldQueue
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*/
|
||||
public function handle(PirepAccepted $pirep) {
|
||||
Log::info('Received event', [$pirep]);
|
||||
}
|
||||
}
|
||||
38
modules/vacentral/Providers/AppServiceProvider.php
Normal file
38
modules/vacentral/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Vacentral\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Boot the application events.
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Register config.
|
||||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->publishes([
|
||||
__DIR__.'/../Config/config.php' => config_path('vacentral.php'),
|
||||
], 'config');
|
||||
|
||||
$this->mergeConfigFrom(
|
||||
__DIR__.'/../Config/config.php', 'vacentral'
|
||||
);
|
||||
}
|
||||
}
|
||||
25
modules/vacentral/Providers/EventServiceProvider.php
Normal file
25
modules/vacentral/Providers/EventServiceProvider.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Vacentral\Providers;
|
||||
|
||||
use App\Events\PirepAccepted;
|
||||
use Modules\Vacentral\Listeners\PirepAcceptedEventListener;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event listener mappings for the application.
|
||||
*/
|
||||
protected $listen = [
|
||||
PirepAccepted::class => [PirepAcceptedEventListener::class],
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
}
|
||||
31
modules/vacentral/composer.json
Normal file
31
modules/vacentral/composer.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "nabeel/vacentral",
|
||||
"license": "MIT",
|
||||
"type": "laravel-module",
|
||||
"description": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nabeel Shahzad",
|
||||
"email": "gm@nabs.io"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"joshbrw/laravel-module-installer": "dev-master"
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Modules\\Vacentral\\Providers\\AppServiceProvider",
|
||||
"Modules\\Vacentral\\Providers\\EventServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Modules\\Vacentral\\": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
15
modules/vacentral/module.json
Normal file
15
modules/vacentral/module.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "vacentral",
|
||||
"alias": "",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"active": 1,
|
||||
"order": 0,
|
||||
"providers": [
|
||||
"Modules\\Vacentral\\Providers\\AppServiceProvider",
|
||||
"Modules\\Vacentral\\Providers\\EventServiceProvider"
|
||||
],
|
||||
"aliases": {},
|
||||
"files": [],
|
||||
"requires": []
|
||||
}
|
||||
Reference in New Issue
Block a user