title: Laravel foreach loop is not working in a view
body: <p>My controller</p>
  
  <pre><code>public function showWelcome()
  {
          $data = Category::select();
          return View::make('hello',$data);
  
  }
  </code></pre>
  
  <p>controller result array </p>
  
  <pre><code>array(3) {
    [0]=&gt;
    object(stdClass)#137 (4) {
      ["id"]=&gt;
      int(1)
      ["category_name"]=&gt;
      string(8) "everyone"
      ["category_image"]=&gt;
      string(36) "7e14fecb5b45941dd9bcff3497c57d1a.png"
      ["start_date"]=&gt;
      string(10) "2014-09-10"
    }
    [1]=&gt;
    object(stdClass)#138 (4) {
      ["id"]=&gt;
      int(2)
      ["category_name"]=&gt;
      string(12) "motivational"
      ["category_image"]=&gt;
      string(36) "99b8dfff667da7a7e9e39e514e3342bd.png"
      ["start_date"]=&gt;
      string(10) "2014-09-09"
    }
    [2]=&gt;
    object(stdClass)#139 (4) {
      ["id"]=&gt;
      int(3)
      ["category_name"]=&gt;
      string(4) "racy"
      ["category_image"]=&gt;
      string(36) "3a213b108c30184a3f416239473a3880.png"
      ["start_date"]=&gt;
      string(10) "2014-09-10"
    }
  }
  </code></pre>
  
  <p>my view</p>
  
  <pre><code>@foreach($data as $fetch)
      {{ $fetch-&gt;id }}
  @endforeach
  </code></pre>
  
  <p>I am trying to show my data array value in view but not work.show a error</p>
  
  <p>Undefined variable: data (View: C:\Users\shanto\my-project\app\views\hello.blade.php) </p>
  
  <p>I am new in laravel .I cant understand whats my wrong.</p>