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="PhpIncludeInspection" 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">
<list>
<option value="behat/behat" />

View File

@@ -76,6 +76,11 @@
"classmap": [
"tests/TestCase.php"
]
},
"extra": {
"installer-paths": {
"modules/{$name}/": ["type:laravel-library"]
}
},
"scripts": {
"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->registerViews();
$this->registerLinks();
$this->registerFactories();
$this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
}
/**
* Register the service provider.
*/
public function register()
{
//
}
/**
* Add module links here
*/
public function registerLinks()
{
}
/**
* Register the routes
*/
@@ -53,12 +35,20 @@ class InstallerServiceProvider extends ServiceProvider
{
Route::group([
'as' => 'installer.',
'prefix' => 'installer',
// If you want a RESTful module, change this to 'api'
'prefix' => 'install',
'middleware' => ['web'],
'namespace' => 'Modules\Installer\Http\Controllers'
], 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",
"description": "",
"name": "phpvms/installer",
"type": "laravel-library",
"description": "The installer module for phpVMS",
"authors": [
{
"name": "",
"name": "Nabeel Shahzad",
"email": ""
}
],
"require": {
"composer/installers": "~1.0"
},
"extra": {
"laravel": {
"providers": [
"Modules\\Installer\\Providers\\InstallerServiceProvider",
"Modules\\Installer\\Providers\\EventServiceProvider"
"Modules\\Installer\\Providers\\InstallerServiceProvider"
],
"aliases": {

View File

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