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

fbr's avatar
Level 2

User Search Doesn't Work

I'm running Spark 4, PHP 7.1.1.

When I do a user search with a clean spark install, no users ever match even though I would expect several to do so.

I walked through it a bit, and I think the problem is in the Laravel\Spark\Http\Controllers\Kiosk\SearchController.

performBasicSearch doesn't seem to properly interpret the $request param as a Request object.

Here is a code snippet from inside performBasicSearch after doing a user search for 't'...

Log::debug($request); 
// returns array (
//  '{"query":"t","errors":{"errors":{}},"busy":false,"successful":false}' => '',
// )

Log::debug($request->input());
// returns array (
//  '{"query":"t","errors":{"errors":{}},"busy":false,"successful":false}' => '',
// )

Log::debug($request->input('query'));
// returns nothing

Any idea what's causing this problem? I see that $request is an array that contains a json string. But there is seemingly no way to manipulate/access that string?

0 likes
6 replies
fbr's avatar
Level 2

Where are those guidelines?

ejdelmonico's avatar
  • OS
  • PHP version
  • Environment
  • Laravel version
  • Spark version
  • Description
  • Steps to reproduce the issue

and if applicable:

  • Node version
  • NPM/Yarn version

These are basic requests for those maintaining. I don't know why the markdown page is gone that states what would be helpful to them. I guess the trend now is to include a .github directory that include issues guidlines.

Daaf's avatar

I also cannot search any users in Kiosk...

fbr's avatar
fbr
OP
Best Answer
Level 2

Latest update fixes it (spark 4.0.3).

meigwilym's avatar

Try and get the SQL that's being run. The Laravel Debug bar is excellent for this, but you could also try

DB::enableQueryLog();
dd(DB::getQueryLog());

Please or to participate in this conversation.