Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mawuva/laravel-macro-search

Laravel macro that help make search on eloquent model
https://github.com/mawuva/laravel-macro-search

Last synced: 7 days ago
JSON representation

Laravel macro that help make search on eloquent model

Awesome Lists containing this project

README

        

# Laravel macro that help make search on eloquent model

This package is a macro service provider to make search on your eloquent model

## Installation

You can install the package via composer:

```bash
composer require mawuekom/laravel-macro-search
```

## Usage

### Laravel

Go to **config/app.php**, and add this in the providers key

```php
'providers' => [
...
Mawuekom\MacroSearch\MacroSearchServiceProvider::class,
...
]
```

### Lumen

Go to **bootstrap/app.php**, and add this in the specified key

```php
// Add provider
$app->register(Mawuekom\MacroSearch\MacroSearchServiceProvider::class);
```

### Your model which inherits an eloquent model

```php