rename module to uppercase to match json
This commit is contained in:
7
modules/Vacentral/Config/config.php
Normal file
7
modules/Vacentral/Config/config.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'vacentral',
|
||||
'address' => 'https://api.vacentral.net',
|
||||
'api_key' => ''
|
||||
];
|
||||
16
modules/Vacentral/Listeners/PirepAcceptedEventListener.php
Normal file
16
modules/Vacentral/Listeners/PirepAcceptedEventListener.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Vacentral\Listeners;
|
||||
|
||||
use App\Events\PirepAccepted;
|
||||
use Log;
|
||||
|
||||
class PirepAcceptedEventListener
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*/
|
||||
public function handle(PirepAccepted $pirep) {
|
||||
Log::info('Received PIREP accepted event', [$pirep]);
|
||||
}
|
||||
}
|
||||
37
modules/Vacentral/Providers/AppServiceProvider.php
Normal file
37
modules/Vacentral/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Vacentral\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Database\Eloquent\Factory;
|
||||
use Route;
|
||||
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
protected $defer = false;
|
||||
protected $moduleSvc;
|
||||
|
||||
/**
|
||||
* Boot the application events.
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->moduleSvc = app('App\Services\ModuleService');
|
||||
$this->registerConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register config.
|
||||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->publishes([
|
||||
__DIR__.'/../Config/config.php' => config_path('vacentral.php'),
|
||||
], 'config');
|
||||
|
||||
$this->mergeConfigFrom(
|
||||
__DIR__.'/../Config/config.php', 'vacentral'
|
||||
);
|
||||
}
|
||||
}
|
||||
26
modules/Vacentral/Providers/EventServiceProvider.php
Normal file
26
modules/Vacentral/Providers/EventServiceProvider.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Vacentral\Providers;
|
||||
|
||||
use App\Events\PirepAccepted;
|
||||
use App\Events\TestEvent;
|
||||
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();
|
||||
}
|
||||
}
|
||||
26
modules/Vacentral/composer.json
Normal file
26
modules/Vacentral/composer.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "nabeel/vacentral",
|
||||
"description": "",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nabeel S",
|
||||
"email": "gm@nabs.io"
|
||||
}
|
||||
],
|
||||
"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": "Vacentral",
|
||||
"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