arkadaşlar iki tarih arasındaki verileri getirmek istiyorum ancak bu şekilde tüm veriler geliyor nerede hata yapıyorum?
<form method="get" action="{{ route('front.blog.dateSearch') }}">
@csrf
<div class="row" style="padding: 10px; background-color: white; border-radius: 15px">
<div class="col-md-5">
<input type="date" name="firstDate" class="form-control">
</div>
<div class="col-md-5">
<input type="date" name="secondDate" class="form-control">
</div>
<div class="col-md-2">
<button class="btn btn-danger " type="submit">Ara</button>
</div>
</div>
</form>
$dateFirst = $request->input('firstDate');
$secondDate = $request->input('secondDate');
$results= [];
$blogs = Blog::
where(function($query) use($dateFirst,$secondDate){
$query->whereBetween('date',array($dateFirst,$secondDate));
$query->where('deleted_at','=',null);
})
->orderBy('id','asc')
->get()
->toArray();
$results['blogs'] = $blogs;
$request_search_text = $request->input('firstDate') ." - " .$request->input('secondDate');
return view('front.blog.search',compact('results','request_search_text' ));