Package Data | |
---|---|
Maintainer Username: | ARTWINPRO |
Maintainer Contact: | admin@artwin.pro (Artwin Pro) |
Package Create Date: | 2016-10-26 |
Package Last Update: | 2017-05-12 |
Language: | PHP |
License: | proprietary |
Last Refreshed: | 2024-11-23 03:19:25 |
Package Statistics | |
---|---|
Total Downloads: | 45 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 3 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
You can install this package by simply run this composer command:
composer require artwinpro/laravel-search
Or require the package in your composer.json
:
"artwinpro/laravel-search": "dev-master"
and run
composer update
Add in model App\Posts:
use Artwinpro\LaravelSearch\SearchTrait;
class Posts extends Model
{
use SearchTrait;
// Searchable fields.
public $searchable = ['name', 'email', 'phone'];
}
And use:
$posts = Posts::search()->get(); // Get searched posts from the database.
Request:
/?name=Admin&email=example@email.com&phone=+37063028205