Reputation: 119
Is there possibility to redirect user to an external URL and pass paramter to it i Laravel 5?
Upvotes: 2
Views: 958
Reputation: 163768
You should use away()
method:
return redirect()->away('http://sample.com/url?param=param')
Upvotes: 1
Reputation: 1494
You can pass values to views:
Route::get('/user/{id}', function () {
$user = User::find($id);
return view('user', ['user' => $user]);
}
And then access user in the view:
{{ $user }}
Upvotes: 0