Closed DevHoracioRodriguez closed 3 years ago
Looks like you are not following Laravel naming conventions.
Models are singular Contact
and tables should be plural contacts
.
Try again following conventions and it should work.
Adding to what @MrCrayon suggested, you should not need a custom controller unless you're customizing the controller logic. But in that case, you would need to enter the fully-qualified class name (i.e. starting with App\......
) in the BREAD config page, not just the class name
Looks like you are not following Laravel naming conventions. Models are singular
Contact
and tables should be pluralcontacts
.Try again following conventions and it should work.
Same result: Table plural, Model singular. Nothing else added.
Adding to what @MrCrayon suggested, you should not need a custom controller unless you're customizing the controller logic. But in that case, you would need to enter the fully-qualified class name (i.e. starting with
App\......
) in the BREAD config page, not just the class name
Thank you for the info. Will have it in mind. Anyways, did try without custom cotroller. Same result. Same error.
Delete the menu item or try on a fresh install, I suspect you are still using the old generated menu item.
@MrCrayon , reviewed tables. Old items (created from Menu Builder) weren't there. I tried with new different name table following naming standard then creating the BREAD but failed on BREAD Submission. All options were default.
My observation: Table, model, menu_items, permission and permission_roles all were created.
All deleted now in order to database and BREAD work again.
Please do a fresh install and report exactly all the steps you are doing with name of table etc. and eventually the error you get. In your first post you wrote
I told BREAD to create Model at App/Models/Contact.php
But BREAD does not create Models, I think the model can be created when you create the table or you need to create it yourself.
Did a fresh install but with Wave! Did some test and the error isn't appearing anymore. Will try again after applying custom changes. If error appears again then will open another case. Thank you for the support.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Version information
Description
Fail to create BREAD. I was following this steps to create a Contact Form with Voyager and Laravel at devdojo. Also, followed Voyager Academy Video 08 - The BREAD Builder. On both cases, I couldn't pass creating BREAD.
Note: Laravel and Voyager was already installed and working at my hosting. I'm not using Digital Ocean.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Successfully create BREAD in order to continue with step 2 to Configure the Model and the rest of the publication.
Screenshots
Additional context
First try: Model was configured at App/Contact.php. After error, deleted the file, the new table and permissions for the Admin Role related to Contact. Second try: I had a Contact page and menu item, so I deleted both since didn't know if had conflict with the new Contact table and BREAD. Followed Voyager Academy Video 08 - The BREAD Builder. Different from first try, I told BREAD to create Model at App/Models/Contact.php. Also, since step 4 of the article explains how to "Create and Configure your Controller" then I assumed to configure CustomController at the BREAD. See image below:
Just in case, I'm using translation (EN, ES).