title: search function without required login
body: <p>this is a search function that should log in to view the search blade.
  I want to show the search blade without required student login and allow anyone to use this function </p>
  
  <p>this is my search function in the controller</p>
  
  <pre><code>public function search()
  {
      $q = Input::get ( 'q' );
      if($q != ""){
          $student = Student::where ( 'uniid', 'LIKE', '%' . $q . '%' )-&gt;get();
          if (count ( $student ) &gt; 0)
              return view ( 'search' )-&gt;withDetails ( $student )-&gt;withQuery ( $q );
          else
              return view ( 'search' )-&gt;withMessage ( 'not fount' );
      }
      return view ( 'search' )-&gt;withMessage ( 'write the number want to search' );
  }
  </code></pre>
  
  <p>and this my search blade </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
   &lt;html&gt;
    &lt;head&gt;
    &lt;title&gt;Search&lt;/title&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;div class="container"&gt;
    &lt;form action="/search" method="POST" role="search"&gt;
    {{ csrf_field() }}
    &lt;div class="input-group"&gt;
      &lt;input type="text" class="form-control" name="q"
          placeholder="search.."&gt; &lt;span class="input-group-btn"&gt;
          &lt;button type="submit" class="btn btn-default"&gt;
              &lt;span class="glyphicon glyphicon-search"&gt;&lt;/span&gt;
          &lt;/button&gt;
      &lt;/span&gt;
  &lt;/div&gt;
  &lt;/form&gt;
   &lt;div class="container"&gt;
  @if(isset($details))
  &lt;table class="table table-striped"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt; unique id&lt;/th&gt;
              &lt;th&gt;  order statuse&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          @foreach($details as $request)
          &lt;tr&gt;
              &lt;td&gt;{{$request-&gt;uniid}}&lt;/td&gt;
              &lt;td&gt;{{$request-&gt;status-&gt;name}}&lt;/td&gt;
          &lt;/tr&gt;
          @endforeach
      &lt;/tbody&gt;
  &lt;/table&gt;
  @elseif(isset($message))
  &lt;p&gt;{{ $message }}&lt;/p&gt;
  @endif
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>