Can you share the code where you're using resolveComponent
Are you using axios request to reach the api endpoints or are you using Inertia with useForm ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi Everyone, I am new to Laravel, i started learning it a couple of weeks back. To get a practical hand-on i decided to create a small project. A Project management app, where users can create a project, add tasks set status, add comments, assign it to others users. I created a Laravel Breeze application with Inertia and React. Now I created a ProjectController, a ProjectResource and Project Model.
Now, i created a route "project.index" route, where I render all the projects in tabular format. Till now, everything is fine. Now i want to implement an Excel like filter functionality, where a user clicks on any column, it will display all the available values and when a user click on few options then hit apply, the table should update accordingly.
I created a post route "api/project/get/filter-values". where i return all unique values based on the column key, based on this response, i render the values in the column drop down.
Now to have an apply feature, i created another post oute "api/project/apply/filter", where i pass payload of {key:columnName, filter_items: an array of values selected by users}. Based on this payload i generate a query and return Inertia view same as "project.index" but with the updated projects.
Now, i get following error, in network section, i get the proper response, with the updated props, however in console i get the error
@inertiajs_inertia.js?v=de0c108c:1565 Uncaught (in promise) TypeError: this.resolveComponent is not a function at n2.setPage (@inertiajs_inertia.js?v=de0c108c:1565:37) at @inertiajs_inertia.j…v=de0c108c:1532:111 XMLHttpRequest.send (async) handleApplyFilter @ Index.jsx:33 handleApplyFilter @ TableHead.jsx:14 Show 24 more frames
Here is my web.php file
@soleh I personally use the same route for the filter/search post request as the current page's get request This way the URL stays the same.
For example if your page url is /project, you can use a route like this for the post request:
Route::post('project', ProjectController::class, ''apply_filter')->name('project.filter');
In my projects I also use the same method for both requests.
If the get request uses the index method, my post request for the search also uses the same index method.
The post route should then be
Route::post('project', ProjectController::class, 'index')->name('project.filter');
See this example:
public function index(Request $request)
{
$page = 1;
if($request->page) $page = $request->page;
$query = Project::query();
if($request->filter_items) {
$query->whereIn('name', $filterItems)->paginate(10)->onEachSide(1);
}
$filteredProjects = $query->paginate(10, ['*'], 'page', $page)->onEachSide(1);
if($request->filter_items) $filteredProjects->appends($request->only(['filter_items']));
return inertia('Project/Index', [
"projects" => ProjectResource::collection($filteredProjects),
]);
}
I've also appended the filter items and added $page for your pagination. Also double check if the route names in my example are correct.
Please or to participate in this conversation.