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')
...
- [Vuejs]-Errors deploying vue/nuxt application to Netlify with Heroku Strapi backend
- [Vuejs]-VUE: the whole page disappeared, only showing "Proxy error…"
Source:stackexchange.com