title: laravel undefined variable error in foreach
body: <p>this is my controller function</p>
  
  <pre><code>public function products() {
  
      return view('products', array('page' =&gt; 'products'));
  }
  </code></pre>
  
  <p>this is view </p>
  
  <p><code>@foreach ($products as $product)</code></p>
  
  <p>this is route</p>
  
  <p><code>Route::get('products','FrontController@products');</code></p>
  
  <p>this is error</p>
  
  <blockquote>
    <p>Undefined variable: products (View:
    C:\xampp\htdocs\OSM\resources\views\products.blade.php)</p>
  </blockquote>