how to get query params in laravel code example
Example 1: laravel get query parameters
$name = $request->query('name', 'Helen');
Example 2: laravel get sql query eloquent with parameters
$query->toSql();
$query->getBindings()
Example 3: laravel get query result as array
$result = array_map(function ($value) {
return (array)$value;
}, $result);