[Vuejs]-Cannot find particular movie in a list vue and laravel

0👍

Not sure if this would resolve all your issues but you could try the following:

Route::get('/movies/{movie}', 'MoviesController@show');
public function show(Movie $movie)
{
    return view('details', ['movie' => $movie]);
}

Also, the naming convention for controllers is to use the model name in its singular form. Your controller should therefore be named MovieController without s.

Another thing, in your view component you should include the movie_id in the url otherwise Laravel has no way to know which movie you’re trying to fetch:

...
axios.get('/movies/1')
...

Leave a comment