how get query from url in laravel
$name = $request->query('name');
how get query from url in laravel
$name = $request->query('name');
laravel get query parameters
$name = $request->query('name', 'Helen');
Laravel 8 - get values of url query strings in controller
---web.php---
Route::get('/api/webhook/{val1?}/{val2?}/{val3?}', [App\Http\Controllers\XyzController::class, 'xprocess'])->name('xprocess');
---XyzController.php---
public function xprocess(Request $request, $val1=null, $val2=null, $val3=null)
{
$val1 = $request->query('val1');
$val2 = $request->query('val2');
$val3 = $request->query('val3');
//process variables etc...
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us