Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Stockholm's avatar

Change the Kiosk, user search query

I would like to change the user search in Kiosk. As it is now I have to enter an exact user name or email to get a search result.

I have "Laravel-Searchy" installed so I would like to change the query in Kiosk searchController.php to:

return Searchy::users('name', 'email')->query($query)->get();

I tried but I can't get it to work. (The query works in php artisan tinker)

0 likes
2 replies
lostdreamer_nl's avatar
  • Are you getting any errors?
  • are you using the correct FQN in your controller for Searchy ( \Searchy for the facade) ?
Stockholm's avatar

No errors. The query is fine. Tested it. It is just that I don't understand how to get Spark to use that query instead of :

return Spark::interact(UserRepository::class.'@search', [ $query, $request->user() ]);

Please or to participate in this conversation.