title: Dropdown using Laravel-5
body: <p>This is my Controller:</p>
  
  <pre><code> public function create(){
  
       $categories =DB::select('select Code from ItemCategory');
       return view('item')-&gt;with('ItemCategory', $categories);
  </code></pre>
  
  <p>My View file:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
  {!! Form::label('Link Category') !!}&lt;br /&gt;
  {!! Form::select('categories', 
      (['0' =&gt; 'Select a Category'] + $categories), 
          null, 
          ['class' =&gt; 'form-control']) !!}
  &lt;/div&gt;
  </code></pre>
  
  <p>But when I run this , I get following error</p>
  
  <blockquote>
    <p>InvalidArgumentException in FileViewFinder.php line 137:
      View [item] not found.</p>
  </blockquote>
  
  <p>PS:<br>My database table:</p>
  
  <pre><code>+----------------+-------------+------+-----+---------+-------+
  | Field          | Type        | Null | Key | Default | Extra |
  +----------------+-------------+------+-----+---------+-------+
  | ID             | int(11)     | NO   | PRI | NULL    |       |
  | Code           | varchar(45) | NO   |     | NULL    |       |
  | ItemCategotyID | int(11)     | NO   |     | NULL    |       |
  | ItemLevelID    | int(11)     | NO   |     | NULL    |       |
  | isActive       | varchar(45) | YES  |     | NULL    |       |
  +----------------+-------------+------+-----+---------+-------+
  </code></pre>
  
  <p>I have tried <a href="http://www.easylaravelbook.com/blog/2015/03/30/dynamically-populating-a-laravel-dropdown-box/" rel="noreferrer">this</a> example. What is the mistake here? How to get values for a drop down using MySQL table?</p>