Update module generation #714 (#716)

* Update module generation #714

* Fix method signatures

* Fix paths within stubs, use single provider.stub file

* Add separate index controller

* Update module generation #714

* Fix method signatures

* Fix paths within stubs, use single provider.stub file

* Update module generation

Disable/lower the cache time as found as a workaround in https://github.com/nWidart/laravel-modules/issues/995

* Update editorconfig for line endings

* Formatting

* Formatting
This commit is contained in:
Nabeel S
2020-09-20 19:10:52 -04:00
committed by GitHub
parent 435fa32663
commit 77fe6679ce
20 changed files with 414 additions and 248 deletions

View File

@@ -2,7 +2,7 @@
namespace Modules\Awards\Providers;
use Illuminate\Support\ServiceProvider;
use App\Contracts\Modules\ServiceProvider;
class AwardServiceProvider extends ServiceProvider
{

View File

@@ -2,8 +2,8 @@
namespace Modules\Importer\Providers;
use App\Contracts\Modules\ServiceProvider;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;
use Modules\Importer\Console\Commands\ImportFromClassicCommand;
class ImporterServiceProvider extends ServiceProvider
@@ -11,7 +11,7 @@ class ImporterServiceProvider extends ServiceProvider
/**
* Boot the application events.
*/
public function boot()
public function boot(): void
{
$this->registerCommands();
$this->registerRoutes();
@@ -20,6 +20,9 @@ class ImporterServiceProvider extends ServiceProvider
$this->registerViews();
}
/**
* Register console commands
*/
protected function registerCommands()
{
$this->commands([
@@ -44,7 +47,6 @@ class ImporterServiceProvider extends ServiceProvider
// Run the actual importer process. Additional middleware
Route::post('/run', 'ImporterController@run')->middleware('api')->name('run');
Route::post('/complete', 'ImporterController@complete')->name('complete');
});
}
@@ -91,12 +93,4 @@ class ImporterServiceProvider extends ServiceProvider
$this->loadTranslationsFrom(__DIR__.'/../Resources/lang', 'importer');
}
}
/**
* Get the services provided by the provider.
*/
public function provides(): array
{
return [];
}
}

View File

@@ -2,15 +2,15 @@
namespace Modules\Installer\Providers;
use App\Contracts\Modules\ServiceProvider;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;
class InstallerServiceProvider extends ServiceProvider
{
/**
* Boot the application events.
*/
public function boot()
public function boot(): void
{
$this->registerRoutes();
$this->registerTranslations();