Undefined variable : <p>I still get this error for some I guess stupid reason. I was following Laracast fundamentals tutorials then I decided to create my own app and it's the same. Probably I've messed something up and can't see it.</p>

<p>Here's the error:</p>

<blockquote>
  <p>Undefined variable: movies (View: C:\Users\username\PhpstormProjects\movie_app\resources\views\movies\show.blade.php)</p>
</blockquote>

<p>This is my controller:</p>

<pre><code>public function show($id)
{
    $movie = Movie::findOrFail($id);
    return view('movies.show', compact('movie'));
}
</code></pre>

<p>View:</p>

<pre><code>@extends('layouts.app')
@section('content')
    @foreach($movies as $movie)
        &lt;h4&gt;{{$movie-&gt;name}}&lt;/h4&gt;
    @endforeach
@endsection
</code></pre>
