I'm trying to get parameters from url like this
domain/test?key=value
and in my Laravel route I defined it this way
Route::get('test', 'mController@index');
and in index()
I'm doing this
public function index(Request $request)
{
$value = $request -> query('key');
echo $value;
}
but $value
is empty and nothing is printed. What is wrong? It's not a duplicate of another question because my problem was from NGINX config file not the PHP code