Package Data | |
---|---|
Maintainer Username: | amranidev |
Maintainer Contact: | amranidev@gmail.com (Amrani Houssain) |
Package Create Date: | 2016-04-26 |
Package Last Update: | 2018-11-05 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-19 03:03:40 |
Package Statistics | |
---|---|
Total Downloads: | 240 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 42 |
Total Watchers: | 5 |
Total Forks: | 5 |
Total Open Issues: | 1 |
Lpackager is a CLI tool that allows you to generate packages/modules into your laravel app without forgetting business logic. Split laravel app into packages/modules.
Run composer require to install Lpackager :
composer require Amranidev/Lpackager
Or add in composer.json:
require : {
"Amranidev/Lpackager": "v1.0.*"
}
Then update composer :
$ composer update
Add the service providers to config/app.php :
Amranidev\Lpackager\LpackagerServiceProvider::class,
Create new package by php artisan lpackager:package <PackageName> <PackagePath> <"NameSpace">
In this example, we will create a new (package/module) into our application with a name (Customer).
Create your first package:
php artisan lpackager:package Customer Kernel "Kernel\Customer"
Register namespace:
Add to composer.json
"psr-4": {
"App\\": "app/",
"Kernel\\Customer\\": "Kernel/Customer/src"
}
Register the service provider:
Add the service provider to config/app.php
Kernel\Customer\CustomerServiceProvider::class,
Finally:
Run composer dump-autoload
Check if evreything is okey :
http://{your-project-url}/client
Create new Package : php artisan lpackager:package <PackageName> <PackagePath> <"NameSpace">
Create new Controller : php artisan lpackager:controller <ClassName> <PackageName> <PackagePath> <"NameSpace">
Create new Model : php artisan lpackager:model <ClassName> <PackagePath> <"NameSpace">