rename module to uppercase to match json

This commit is contained in:
Nabeel Shahzad
2017-12-05 21:57:12 -06:00
parent e604d5bb08
commit 46b86cf3a6
7 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
<?php
return [
'name' => 'vacentral',
'address' => 'https://api.vacentral.net',
'api_key' => ''
];

View 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]);
}
}

View 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'
);
}
}

View 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();
}
}

View 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\\": ""
}
}
}

View 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": []
}