pass data back to the same view laravel code example
Example 1: laravel pass variables to view
return view('home')->with('userName',$userName);
Example 2: pass parameter to view laravel
Route::get('/', function () {
return view('greeting', ['name' => 'James']);
});