Cleanup Installer module scaffolding

This commit is contained in:
Nabeel Shahzad
2017-12-13 22:42:45 -06:00
parent 3e3f18fd0c
commit d1a761711a
9 changed files with 32 additions and 59 deletions

View File

@@ -30,7 +30,7 @@
<inspection_tool class="PhpExpressionResultUnusedInspection" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="PhpExpressionResultUnusedInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpIncludeInspection" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="PhpIncludeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpSignatureMismatchDuringInheritanceInspection" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="PhpSignatureMismatchDuringInheritanceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SecurityAdvisoriesInspection" enabled="true" level="WARNING" enabled_by_default="true"> <inspection_tool class="SecurityAdvisoriesInspection" enabled="false" level="WARNING" enabled_by_default="false">
<option name="optionConfiguration"> <option name="optionConfiguration">
<list> <list>
<option value="behat/behat" /> <option value="behat/behat" />

View File

@@ -76,6 +76,11 @@
"classmap": [ "classmap": [
"tests/TestCase.php" "tests/TestCase.php"
] ]
},
"extra": {
"installer-paths": {
"modules/{$name}/": ["type:laravel-library"]
}
}, },
"scripts": { "scripts": {
"post-root-package-install": [ "post-root-package-install": [

View File

@@ -0,0 +1,3 @@
<?php
Route::get('/', 'InstallerController@index');

View File

@@ -0,0 +1,3 @@
<?php
Route::get('/update', 'InstallerController@index');

View File

@@ -1,7 +0,0 @@
<?php
Route::group(['middleware' => []], function() {
Route::get('/', 'InstallerController@index');
});

View File

@@ -1,23 +0,0 @@
<?php
namespace Modules\Installer\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*/
protected $listen = [
];
/**
* Register any events for your application.
*/
public function boot()
{
parent::boot();
}
}

View File

@@ -24,28 +24,10 @@ class InstallerServiceProvider extends ServiceProvider
$this->registerConfig(); $this->registerConfig();
$this->registerViews(); $this->registerViews();
$this->registerLinks();
$this->registerFactories(); $this->registerFactories();
$this->loadMigrationsFrom(__DIR__ . '/../Database/migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
} }
/**
* Register the service provider.
*/
public function register()
{
//
}
/**
* Add module links here
*/
public function registerLinks()
{
}
/** /**
* Register the routes * Register the routes
*/ */
@@ -53,12 +35,20 @@ class InstallerServiceProvider extends ServiceProvider
{ {
Route::group([ Route::group([
'as' => 'installer.', 'as' => 'installer.',
'prefix' => 'installer', 'prefix' => 'install',
// If you want a RESTful module, change this to 'api'
'middleware' => ['web'], 'middleware' => ['web'],
'namespace' => 'Modules\Installer\Http\Controllers' 'namespace' => 'Modules\Installer\Http\Controllers'
], function() { ], function() {
$this->loadRoutesFrom(__DIR__ . '/../Http/routes.php'); $this->loadRoutesFrom(__DIR__ . '/../Http/Routes/install.php');
});
Route::group([
'as' => 'installer.',
'prefix' => 'install',
'middleware' => ['web'],
'namespace' => 'Modules\Installer\Http\Controllers'
], function () {
$this->loadRoutesFrom(__DIR__ . '/../Http/Routes/update.php');
}); });
} }

View File

@@ -1,17 +1,20 @@
{ {
"name": "/installer", "name": "phpvms/installer",
"description": "", "type": "laravel-library",
"description": "The installer module for phpVMS",
"authors": [ "authors": [
{ {
"name": "", "name": "Nabeel Shahzad",
"email": "" "email": ""
} }
], ],
"require": {
"composer/installers": "~1.0"
},
"extra": { "extra": {
"laravel": { "laravel": {
"providers": [ "providers": [
"Modules\\Installer\\Providers\\InstallerServiceProvider", "Modules\\Installer\\Providers\\InstallerServiceProvider"
"Modules\\Installer\\Providers\\EventServiceProvider"
], ],
"aliases": { "aliases": {

View File

@@ -6,8 +6,7 @@
"active": 1, "active": 1,
"order": 0, "order": 0,
"providers": [ "providers": [
"Modules\\Installer\\Providers\\InstallerServiceProvider", "Modules\\Installer\\Providers\\InstallerServiceProvider"
"Modules\\Installer\\Providers\\EventServiceProvider"
], ],
"aliases": {}, "aliases": {},
"files": [], "files": [],