Answers for "laravel get ur query string"

C#
1

how get query from url in laravel

$name = $request->query('name');
Posted by: Guest on June-12-2021
0

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...
        
     }
Posted by: Guest on October-29-2021

C# Answers by Framework

Browse Popular Code Answers by Language