Answers for "laravel add url query string"

PHP
0

laravel add url query string

// web.php file
Route::get('/test', function (\Illuminate\Http\Request $request) {
  return dump($request->query('hello')); // world 
})->name('test');

// .blade.php file
<a href="{{ route('test', ['hello' => 'world']) }}"> // /test?hello=world
Posted by: Guest on September-26-2021

Browse Popular Code Answers by Language