๐Ÿ“ขEloquent Custom Scope

WhereLike Scope

This package has a custom whereLike scope binded to Builder. This method in Laravel's query builder would be beneficial for many developers, as it simplifies the process of performing case-insensitive searches and supports searching through related models.

Usage Example

// Example usage of whereLike inside your repository.
$users = $this->model::whereLike(['name', 'email', 'roles.name'], 'john')->get();

Last updated

Was this helpful?