Wallogit.com
2017 © Pedro Peláez
, (*1)
| master branch |
|---|
Now managing your applications to have the same resources is made easy with this package., (*2)
Imagine having an API, Admin Panel and some other functionalities that handles the same classes like service providers, models, events, console commands, migrations etc., (*3)
via console, execute this composer require laralibs/modular@0.*@dev, (*4)
in your laravel project add this in your composer.json, (*5)
{
...
"autoload": {
...
"psr-4": {
...
"Modules\\": "modules"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
and add this ModularServiceProvider in your config/app.php at providers index., (*6)
'providers' => [
...
LaraLibs\Modular\ModularServiceProvider::class,
],
When you are done adding this class, you should be able to see make:module command after running the php artisan, (*7)
When running the command, (*8)
php artisan make:console admin, this should generate the lists of files, (*9)
After that, insert the RouteServiceProvider.php in your providers config, something like Modules\Admin\Providers\RouteServiceProvider::class, (*10)
Now point your NginX or Apache to use the public/admin.php instead, and you are set to go!, (*11)