window.location.href = "{{ route('show-all-prescription')}}";
return redirect()->route('route_name');
//with data
return redirect()->route('route_name', ['key' => $value]);
Route::post('/user/profile', function () {
// Update the user's profile...
return redirect('/dashboard')->with('status', 'Profile updated!');
});
path = "{{route('dashboard')}}";
window.location.href = path;