Level 6
usually it's happen because this mount function can't find the Model.php file,
but can you give more detail information with this error ? like the code or route ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
On run of the mount function passed with Model $model, i get a return error of 404
This one throws a 404
routes/web.php
Route::get('route/{model}', ApplicationView::class);
livewire/component.php
public function mount(Model $model)
{
...
}
This works
routes/web.php
Route::get('route/{id}', ApplicationView::class);
livewire/component.php
public function mount($id)
{
$model = Model::find($id);
}
Note: I am using the same id and the record exists in the db
Also, this is specific to this model, all my other models work just fine with the first implementation.
Please or to participate in this conversation.