'Laravel 8 route with multiple parameters

I am trying to use multiple parameters in route in Laravel 8 but for some reason it does not work.

My web.php

    Route::get('/mp3/{name}/{album]/{track}' , [TracksController::class, 'trackDetails'])->name('trackDetails')
->where([
    'name' => '[a-z]+',
    'album' => '[a-z]+',
    'name' => '[a-z]+'
])

My controller

public function trackDetails ($name, $album, $track)
    {
        return view('mp3.trackdetails', [
            'name' => $name,
            'album' => $album,
            'track' => $track,
        ]);
    }

I have created the blade view with a simple title but I get 404 error. Am I missing something? I want to generate a url like example.com/mp3/artist/album/track



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source