L-modular library gives you the ability to divide your system into multiple packages, each package has its own required classes so, your system will become more clearly in addition to simplify the re-using of the common generated packages such as (user , admin etc. ) in another projects
$ composer require l-modular/package
copy service provider link to config/app.php , providers[]
Modular\Provider\ModularServiceProvider::class,
after typing php artisan
, you can use one of the commands below
$ php artisan packages:create {package}
this command helps you to create new package by inserting the package name instead of
${package}
.
- The default master folder is Modules, means that if you applied the command in the above,
the path of your package will be like
{YourProject}/Modules/{package}
- If you want to create package with custom path, you should append
--path=
to the command in the above to be likephp artisan packages:create {package} --path={package_full_path}
so the result will be like{YourProject}/{path}/{package}
.the following command helps you show the names of packages you've created before.$ php artisan packages:list
This line deletes the package you passed and removes its ServiceProvider from$ php artisan packages:delete {package}
Config/app
- If you want to customize the stub files, just type the command below.
Once you typed the command, a new folder with Packages/l-modular/assets path will be generated automatically with all stubs that used to generate package's classes.
$ php artisan packages:stubs
$ php artisan packages:model {model} {package}
this command helps you create a new model in the package you chose.
$ php artisan packages:controller {controller} {package}
this command helps you create a new controller in the package you chose.
$ php artisan packages:middleware {middleware} {package}
this command helps you create a new middleware in the package you chose.
$ php artisan packages:migration {migration} {package}
this command helps you create a new migration in the package you chose.
$ php artisan packages:repo {repository} {package}
this command helps you create a new repository in the package you chose.
$ php artisan packages:service {service} {package}
this command helps you create a new service in the package you chose.
Please, feel free to contact me if get any kind of issues
- Email Amr Saidam
- Upwork Amr Saidam
- Twitter Amr Saidam