Open pixieaka opened 2 years ago
Any update with this issue? Got the same problem unfortunately :(
I have got the same problem.
Same issue here
Same issue here as well.
me too.
Same for me
+1
wow, today 25 may 2022 and still face this problem
+1
+1
Same issue
It's been 6 months, time to get a different plugin i guess
withQueryString()
works but it is not recognize in the laravel query types nor Ide-helper package.appends
instead of withQueryString()
here's how:
$users = User::query()
->paginate(15)
->appends($request->all());
other way:
->appends(['search' => $request->search]);
->appends($request->only('search'));
Another way to fix this, which works if you don't have acces to the request object anymore
/**@var LengthAwarePaginator */
$paginate = User::query()->paginate(10);
return $paginate->withQueryString();
Has same problem with toArray due to it returning the contract and not the class which implements the Arrayable interface. Mentioned in #741. The solution above does work. Just mentioning for fellow travelers.
The same issue persists.
I'm going with https://github.com/barryvdh/laravel-ide-helper/issues/1278#issuecomment-1551013786 for now.
Same issue.
I use this all the time which works perfectly fine and is part of Laravel:
$locations = ClinicLocation::onlyTrashed()->paginate($perPage)->withQueryString();
but VS Code shows Undefined Method.
Other times (even in the same file!) it has no problems:
Still facing this issue !
Don't use the method query()
Versions:
Description:
Undefined method 'withQueryString'.intelephense(1013)
Steps To Reproduce:
Just fresh Laravel app