Question: I am new in laravel framework now I'm working fully developed website using Laravel. I have changed blog url form {id} to {id}/{name} like www.example.com/news/203 to www.example.com/news/203/title. It's working fine. but i need to redirect if old url enter into current url opened from cache or something else.

```
Route::get('{id}/{name}', 'EventController@show')
            ->name('events-detail')
            ->where([
                "id" => "[0-9]+"
    ]);

```

Answer: 
Create 2 routes and add below code.

```
Route::get('{id}/{name}', function () {
    //new URL as you want
    return redirect()->route({id}/{name});
});
Route::get('{id}', function () {
    //as you want for simple URL
});

```
I'm assuming the `name` portion is not really used at all, except for SEO/friendlier urls. If this is the case, just make the `name` parameter optional, and there will be no need for a redirect:

```
Route::get('{id}/{name?}', 'EventController@show')
    ->name('events-detail')
    ->where([
        "id" => "[0-9]+"
    ]);

```

This route will match `/203` and `/203/news-title`.