1. Go to this page and download the library: Download claver/smart-query library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Claver\SmartQuery\HasSmartQuery;
class User extends Model{
use HasSmartQuery;
}
class UserController extends Controller{
public function index(Request $request){
$users = (new User())->resolve();
return response()->json($users);
}
}