 <p>Change the following line:</p> <pre><code>return view('welcome')-&gt;withRestaurants($restaurants); // there is nothing like withRestaurants in laravel </code></pre> <p>to </p> <pre><code>return view('welcome', array('restaurants' =&gt; $restaurants)); </code></pre> <p>and try again.</p>