There is no need for much implementation, just create an endpoint for your searches and start the server of your application and write your query.
You can install the package via composer:
composer require marcus-campos/dealer
Publish the package configuration:
php artisan vendor:publish --provider="MarcusCampos\Dealer\DealerServiceProvider"
Create a Controller. E.g:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Dealer;
class SearchController extends Controller
{
/**
* Index
*
* @param Request $request
* @return Json
*/
public function index(Request $request)
{
$query = $request->query('q');
$result = Dealer::negotiate($query);
return response()->api($result);
}
}
Create a route. E.g:
Route::get('search', "SearchController@index");
Make a query. E.g:
GET /api/search?q=user(id,name,email,profile(*))->filters(filterByName('Marcus'))->orderBy(id,desc)->paginate(30)->limit(40)&page=1 HTTP/1.1
Host: localhost:8080
cache-control: no-cache
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.