Creating Custom Packages Error
-
Hello Bagisto Team,
I am creating a custom contact package by looking at the https://devdocs.bagisto.com/1.x/packages/create_package.html
The package has been created by the php artisan package:make Ebest/Contact
After the I have set provider on config/app.php (Ebest\Contact\Providers\ContactServiceProvider::class,)
On composer.json
"psr-4": {
"Ebest\Contact\": "packages/Ebest/Contact/src"
}After dumping the autoload and updating the composer
I am getting this error
Route [contact.admin.index] not defined. (View: D:\xampp\htdocs\bagisto\packages\Webkul\Admin\src\Resources\views\layouts\master.blade.php) (View: D:\xampp\htdocs\bagisto\packages\Webkul\Admin\src\Resources\views\layouts\master.blade.php)
Please Help...
Thanks in advance.
-
Hi @himanshu-kmr,
Check the
composer.json
file,It should be like this,
"psr-4": { "Ebest\\Contact\\": "packages/Ebest/Contact/src" }
And second thing is that your routes have not been registered. If routes are created then run
php artisan optimize
. -
@devansh-webkul said in Creating Custom Packages Error:
e composer.json f
Thank You @devansh-webkul , The problem has been solved by running php artisan optimize
-
Hi @himanshu-kmr,
Thanks for the update.
Also, if you like our support, you may give us the review here:- https://www.trustpilot.com/review/bagisto.com
That would be grateful for us.
Thanks & Regards,
Bagisto Team