title: how to preform a dynamic select dropdown in laravel 4
body: <p>I've got my relationships setup where my projects are related to clients, what I want to do is to be able to select a select in my create project view via drop down list. </p>
  
  <p>This can be achieved as so:</p>
  
  <p><code>{{ Form::select('client', array('s' =&gt; 's', 'm' =&gt; 'm'), 's');}}</code></p>
  
  <p>However I'm not sure how I would do this dynamically from the data I am retrieving from the database, the code I have so far is:</p>
  
  <pre><code>{{ Form::open(array('action' =&gt; 'ProjectController@store', 'id' =&gt; 'createproject')) }}
    &lt;div class="form-group"&gt;
    &lt;? $projects = Auth::user()-&gt;clients; ?&gt;
  @if (Auth::check())
      @if (count($projects) &gt; 0)
     @foreach ($projects as $client)
  
  {{ Form::select('client', array('client_one' =&gt; 'client_one', 'client_two' =&gt; 'client_two'), 'client_one');}}
  
     @endforeach 
     @else
      &lt;h3&gt;You have no projects click &lt;a href="/project/create"&gt;here to create a project&lt;/a&gt;&lt;/h3&gt;
  @endif
  @endif
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
      {{ Form::label('project_name', 'Project Name') }}
      {{ Form::text('project_name', Input::old('project_name'), array('class' =&gt; 'form-control')) }}
  
  &lt;/div&gt;
  </code></pre>
  
  <p>Can anyone point me into the direction of how I can populate this select field dynamically?</p>
  
  <p>Thanks in advance!</p>