Target [Illuminate\Database\Eloquent\Model] is not instantiable.
In the new upgrade list, delete and Breadcrumbs work correctly but in create action, I got this error " Target [Illuminate\Database\Eloquent\Model] "
only when I click on new create
9 Replies
This is my reference I built them in v2 and work correctly.
https://laraveldaily.com/post/filament-nested-resources-courses-lessons
This is your last warning. If you keep posting duplicate questions, you will get banned from the server. If you want people to help you, you need to put in the effort. Send your code, maybe even a reproduction repository. Send a Flare error URL. Just give us something to work with. Also, no begging in DMs, we are giving you free support and have no obligation to respond. Make it easy for us.
Ok, I am sorry
yesterday I got no response so I thought that no one had seen the Q
I have done the project for 3 months and everything is working correctly. but when I updated I got this error and really I don't know where the error comes from. from the resource or create page or middleware or providers? i can join with you in calling if you can help me and thank you agin
I have done the project for 3 months and everything is working correctly. but when I updated I got this error and really I don't know where the error comes from. from the resource or create page or middleware or providers? i can join with you in calling if you can help me and thank you agin
Hello, we have tried a few times now. you have to debug the code yourself too, going through each step with some 'dd' or 'die' functions testing where it fails.
This stackoverflow explains your issue:
https://stackoverflow.com/questions/70743149/target-illuminate-database-eloquent-model-is-not-instantiable-while-building
If still in doubt, ask AI to explain and understand the reasoning for the error.
And finally use phpStorm to alert you of the errors and it should advise you are doing that when you can't.
Stack Overflow
Target [Illuminate\Database\Eloquent\Model] is not instantiable whi...
Peeps, I'm lost. Tried everything and after 5 hours of searching through the 10th page of Google hits, I give up. Maybe I just dont know how to ask Google the correct keywords..
I have this scenari...
also, read my message, I tell you exactly the things we need to be able to pinpoint the issue
you've probably done
fn (Model $bla)
in the wrong place, hence why the container is trying to instantiate the modelokay
@Rahaf you solve the problem ? can you share with me how you solve this ? i have same error too
You are likely using Model $record somewhere opposed to TheModelYouNeed $record
I'm not sure what I should do, but here is the code in my resource.. what did i wrong ?
Previously I didn't check that someone had asked something similar, so I made a new question... there is a link to the flare that I shared... can you follow up there?
https://discordapp.com/channels/883083792112300104/1202928678473039942