I already tested this Firebase Filtering data with PHP but im getting this error and i dont have any clue how to debug this
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error:
GET https://table.firebaseio.com/tbl_admin?orderBy=%22username%22&equalTo=%22admin%22&limitToFirst=1
resulted in a400 Bad Request
response: { "error" : "Index not defined, add \".indexOn\": \"username\", for path \"/tbl_admin\", to the rules" } in D:\Xampp\htdocs\firebase\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php:113 Stack trace: #0 D:\Xampp\htdocs\firebase\vendor\guzzlehttp\guzzle\src\Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 D:\Xampp\htdocs\firebase\vendor\guzzlehttp\promises\src\Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response))2 D:\Xampp\htdocs\firebase\vendor\guzzlehttp\promises\src\Promise.php(156):
GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 D:\Xampp\htdocs\firebase\vendor\guzzlehttp\promises\src\TaskQueue.php(47): GuzzleHttp\Prom in D:\Xampp\htdocs\firebase\vendor\kreait\firebase-php\src\Firebase\Exception\QueryException.php on line 28
how will i filter this on firebase as i have queried it on mysql like this:
SELECT * FROM tbl_admin WHERE username = 'admin'