Error when create new record
Maybe this is a silly problem, but i can't figure it out in hours..
I want to create data with form builder, but it return these error..
maybe some of you have ever experienced it, how can i fix it?
6 Replies
We need more information to help you debug your problem. Please click on the top left 'SHARE' button of the error page you're seeing and share the link with us.
https://flareapp.io/share/A7E01peP#F73
here it is..
Flare
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sidonat.1' doesn't exist (Connection: mysql, SQL: select count(*) as aggregate from
1
where slug
= q3wewqrfwe) - The error occurred at http://localhost:8000/admin/campaigns/createi cant see where it is, but i think one of your form components is using 0 as a table name. remove the fields one by one and see which causes the problem
hmm okay..
i'll check it..
thanks for your suggestion..
TextInput::make('slug')->label('url')->disabledOn('edit')->required()
->unique(static fn (Page $livewire) => $livewire instanceof CreateCampaign)
->dehydrated(static fn (Page $livewire) => $livewire instanceof EditCampaign),
This component is generating the above error.
What I want to achieve with this component is to make it unique in the create page and dehydrated when in the edit page. In addition to the slug being unique in the table, the slug cannot be edited.
What can I do to fix the component so that it behaves the way I want it to?
this is works for me..
thanks..