title: Can I use Auth method in blade to show certain options in the select?
body: <p>I would like to know if it is possible use a blade directive to make some custom options. I want when the admin is authenticated appears all users, and if it is a student, the options available reduces to one.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="form-group {{ $errors-&gt;has('course_id') ? 'has-error' : '' }}"&gt;
      &lt;label for="user_id" class="col-md-2 control-label"&gt;User&lt;/label&gt;
      &lt;div class="col-md-10"&gt;
          &lt;select class="form-control" id="user_id" name="user_id"&gt;
              &lt;option value="" style="display: none;" {{ old('user_id', optional($registeredCourse)-&gt;user_id ?: '') == '' ? 'selected' : '' }} disabled selected&gt;Select user&lt;/option&gt;
              @foreach ($users as $key =&gt; $user)
                  &lt;option value="{{ $key }}" {{ old('user_id', optional($registeredCourse)-&gt;user_id) == $key ? 'selected' : '' }}&gt;
                      {{ $user }}
                  &lt;/option&gt;
              @endforeach
          &lt;/select&gt;
  
          {!! $errors-&gt;first('course_id', '&lt;p class="help-block"&gt;:message&lt;/p&gt;') !!}
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>@if( auth()-&gt;user()-&gt;type == 'admin' )
      &lt;option value="" style="display: none;" {{ old('user_id', optional($registeredCourse)-&gt;user_id ?: '') == '' ? 'selected' : '' }} disabled selected&gt;Select user&lt;/option&gt;
      @foreach ($users as $key =&gt; $user)
          &lt;option value="{{ $key }}" {{ old('user_id', optional($registeredCourse)-&gt;user_id) == $key ? 'selected' : '' }}&gt;
              {{ $user }}
          &lt;/option&gt;
      @endforeach
  @else
      // Here I just need the user_id of the guest
  @endif
  </code></pre>
  
  <p>Thanks.</p>