Steps to create package with controllers:
1.Create Package
php artisan workbench vendor/package --resources
2. migrate package if some migration files
cmd:
php artisan migrate --bench="test/test"
3. Add name , email and description in the composer file.
4.Also in the autload of the composer file add lines:
"src/controllers",
"src/models"
Note- Never add this lines if there is no model and controller you have been created.
6. Run the command
php artisan dump-autoload
Note only after running the command do the below steps
5 Register in the service provider.
Eg.add in provider array()
'test\test\testServiceProvider',
6.Try to make sure that package name is same in the above service provider and it is case sensitive.
Comments
Post a Comment