title: Building drop-down-list in Laravel (without models)
body: <p>I am trying to make a drop down list in Laravel with the select options being values from my database and I have some issues. In other tutorials in this site, doing drop down list inquires building the models for your database. I have not created model classes and I do not intend to.</p>
  
  <p>Routes.php</p>
  
  <pre><code>Route::get("/user/charname", array(
      'as' =&gt; 'profile-character',
      'uses' =&gt; 'ProfileController@dropDownList'
  ));
  </code></pre>
  
  <p>ProfileController.php</p>
  
  <pre><code>class ProfileController extends BaseController
  {
      public function dropDownList()
      {
          $list = DB::table('characters')-&gt;where('char_id', '128')-&gt;pluck('char_name');
          return View::make('layout.profile')-&gt;with('character_options',$list);
      }
  }
  </code></pre>
  
  <p>In the profile.blade.php    (view)</p>
  
  <pre><code>&lt;div class="selected_char"&gt;
      &lt;form action="{{ URL::route('profile-character') }}" method="post"&gt;
          &lt;li&gt;
              {{ Form::select('character_options', $list ,Input::old('character_options')) }}
          &lt;/li&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>By doing this it says that $list from my view is undefined. Where do I define $list in the view and how will I carry $list from my Controller to the View because this line doesn't seem to do it's job</p>
  
  <pre><code>return View::make('layout.profile')-&gt;with('character_options',$list);
  </code></pre>