We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request
Searchable::process()
Seaaaaarch/src/Searchable.php
Lines 13 to 17 in 3e606d5
I suggest changing it to like this:
class Searchable { protected $params = []; protected $request; public function __construct(Request $request = null) { $this->request = $request ?? Request::instance(); } public function process($builder, $query = null) { if (is_null($query)) { $query = $this->request->query(); } ...
You can probably use it as before,
$users = User::query() ... ->where(...) ->search(new UserSearch()) ->get();
or you can pass an instance of the Request class.
$users = User::query() ... ->where(...) ->search(new UserSearch($request)) ->get();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Seaaaaarch/src/Searchable.php
Lines 13 to 17 in 3e606d5
I suggest changing it to like this:
You can probably use it as before,
or you can pass an instance of the
Request
class.The text was updated successfully, but these errors were encountered: