title: Laravel @foreach - invalid argument supplied
body: <p>I am very new to Laravel and PHP, just trying to list all users in my view file like this:</p>
  
  <pre><code>@foreach ($users as $user)
      &lt;li&gt;{{ link_to("/users/{$user-&gt;username}", $user-&gt;username) }}&lt;/li&gt;
  @endforeach
  </code></pre>
  
  <p>But getting an error which says 'Invalid argument supplied for foreach()'</p>
  
  <p>In my controller, I have the following function:</p>
  
  <pre><code>public function users() {
      $user = User::all();
      return View::make('users.index', ['users' =&gt; '$users']);
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>