laravel / scout

Laravel Scout provides a driver based solution to searching your Eloquent models.
https://laravel.com/docs/scout
MIT License
1.54k stars 327 forks source link

Repaces when and tap functions with Conditionable and Tappable traits #811

Closed ncharalampidis closed 5 months ago

ncharalampidis commented 5 months ago

Removes when and tap functions from scout Builder and replaces them Conditionable and Tappable traits.

This way we can also use the "unless" function and also use the "when" and "tap" higher order implementations:

Example::search('foo')
  ->when($request->has('bar'))->where('bar', $request->bar)
  ->get();