title: laravel err Argument 2 passed to Illuminate\Database\Query\Builder::whereBetween() must be of the type array
body: <p>i am new in laravel this is my first app well,</p>
  <p>i want to display all operations between 2 dates insert by user but i got this error(Argument 2 passed to Illuminate\Database\Query\Builder::whereBetween() must be of the type array, null given, called in C:\Users\tgtv\Desktop)</p>
  <p>operation table (id , vehicule , date, personnel_id)</p>
  <p>okay now this is my search blade php</p>
  <pre><code>&lt;form method=&quot;post&quot; action=&quot;{{ route('etatperso.store') }}&quot; enctype=&quot;multipart/form-data&quot; width=&quot;20&quot; height=&quot;20&quot;&gt;
  
      @csrf
      &lt;div class=&quot;form-group&quot;&gt;
                   &lt;label class=&quot;col-md-4&quot;&gt;Personnel :&lt;/label&gt;
                  &lt;div class=&quot;col-md-8&quot;&gt;
                  &lt;select name=&quot;personnel_id&quot;  id=&quot;personnel_id&quot; class=&quot;form-control&quot; &gt;
                      &lt;option value=&quot;&quot;&gt;Select Personnel&lt;/option&gt;
                      @foreach($personnels as $personnel)
                      &lt;option value=&quot;{{ $personnel-&gt;id}}&quot;&gt;{{ $personnel-&gt;nom }}&lt;/option&gt;
                      @endforeach
                  &lt;/select&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
  
           &lt;div class=&quot;form-group&quot;&gt;
          &lt;label class=&quot;col-md-4&quot;&gt;Date debut :&lt;/label&gt;
          &lt;div class=&quot;col-md-8&quot;&gt;
              &lt;input type=&quot;date_debut&quot;   name=&quot;date_fin&quot; value=&quot;{{ old('date', date('Y-m-d')) }}&quot; class=&quot;form-control input-lg&quot; /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      
  
  
      &lt;div class=&quot;form-group&quot;&gt;
          &lt;label class=&quot;col-md-4&quot;&gt;Date fin&lt;/label&gt;
          &lt;div class=&quot;col-md-8&quot;&gt;
              &lt;input type=&quot;date_fin&quot;   name=&quot;date_fin&quot; value=&quot;{{ old('date', date('Y-m-d')) }}&quot; class=&quot;form-control input-lg&quot; /&gt;
          &lt;/div&gt;
      &lt;/div&gt;   
      
       &lt;br/&gt;
      &lt;div class=&quot;form-group text-center&quot;&gt;
          &lt;input type=&quot;submit&quot; name=&quot;add&quot; class=&quot;btn btn-primary input-lg&quot; value=&quot;Ajouter Personnel&quot; /&gt;
      &lt;/div&gt;
  
  &lt;/form&gt;
  </code></pre>
  <p>and this is my function search in the controller</p>
  <pre><code> public function store(Request $request)
      {
          $personnels = Personnel::all();
          $personnel_id=$request-&gt;get('personnel_id');
           $date_debut=$request-&gt;get('date_debut');
          $date_fin=$request-&gt;get('date_fin');
          $data =Operation::where('personnel_id','LIKE',$personnel_id)-&gt;whereBetween('date',$date_debut,$date_fin)-&gt;paginate(1000);
  
  
          return view('etatperso.resultat', compact('data','personnels'));
  
  
  
  
  
      }
  </code></pre>
  <p>and finnaly this is my result.blade.php</p>
  <pre><code>&lt;table class=&quot;table table-bordered table-striped&quot;&gt;
      &lt;th width=&quot;10%&quot;&gt;ID&lt;/th&gt;
          &lt;th width=&quot;10%&quot;&gt;Vehicule&lt;/th&gt;
          &lt;th width=&quot;10%&quot;&gt;Personnel&lt;/th&gt;
          &lt;th width=&quot;10%&quot;&gt;Creation&lt;/th&gt;
          &lt;th width=&quot;10%&quot;&gt;Description&lt;/th&gt;
          &lt;th width=&quot;10%&quot;&gt;Date&lt;/th&gt;
          &lt;th width=&quot;10%&quot;&gt;Etat&lt;/th&gt;
          &lt;th width=&quot;10%&quot;&gt;Prix total&lt;/th&gt;
          
  
      &lt;/tr&gt;
      @foreach($data as $row)
          &lt;tr&gt;
              &lt;td&gt;{{ $row-&gt;id}}&lt;/td&gt;
              &lt;td&gt;{{ $row-&gt;vehicule }}&lt;/td&gt;
              &lt;td&gt;{{ $row-&gt;personnel-&gt;nom}}&lt;/td&gt;
              &lt;td&gt; {{$row-&gt;creation}}&lt;/td&gt;        
              &lt;td&gt;{{ $row-&gt;description }}&lt;/td&gt;
              &lt;td&gt;{{ $row-&gt;created_at}}&lt;/td&gt;
  
              @if($row-&gt;etat ==&quot;en cours&quot;)
                  &lt;td style=&quot;background-color: red;&quot;&gt;{{ $row-&gt;etat}}&lt;/td&gt;
                  @elseif($row-&gt;etat ==&quot;paye&quot;)
                  
                  &lt;td style=&quot;background-color: green;&quot;&gt;{{ $row-&gt;etat}}&lt;/td&gt;
  
                  @endif
              &lt;td&gt;{{ $row-&gt;prix_total}}&lt;/td&gt;
              
              
                  @if($row-&gt;etat ==&quot;paye&quot;)
                  &lt;td&gt;
                      &lt;a href=&quot;{{ route('details', $row-&gt;id) }}&quot; style=&quot;display: none;&quot; class=&quot;btn btn-success btn-sm&quot;&gt;Ajouter articles nécessaire&lt;/a&gt;
                  
                  &lt;br&gt; &lt;/br&gt;  
                  &lt;a href=&quot;{{ route('liste_utilisee', $row-&gt;id) }}&quot; class=&quot;btn btn-warning btn-sm&quot;&gt;Liste des Articles Utilisés&lt;/a&gt;&lt;/td&gt;
                  @elseif ($row-&gt;etat ==&quot;en cours&quot;)
                  &lt;td&gt;
                      &lt;a href=&quot;{{ route('details', $row-&gt;id) }}&quot;  class=&quot;btn btn-success btn-sm&quot;&gt;Ajouter articles nécessaire&lt;/a&gt;
                  
                  &lt;br&gt; &lt;/br&gt;
  
                  &lt;a href=&quot;{{ route('action', $row-&gt;id) }}&quot;  class=&quot;btn btn-danger btn-sm&quot;&gt;Ajouter action&lt;/a&gt; 
                  &lt;br&gt; &lt;/br&gt;
                  &lt;a href=&quot;{{ route('liste_utilisee', $row-&gt;id) }}&quot; class=&quot;btn btn-warning btn-sm&quot;&gt;Liste des Articles Utilisés&lt;/a&gt;&lt;/td&gt;
  
          
          &lt;/tr&gt;
          @endif
      @endforeach
  
  &lt;/table&gt;
  </code></pre>