2
選擇過濾器後,我想顯示摘要選項卡/消息我們選擇了什麼。 我GOOGLE了它,發現會話方法,它適合我的情況? 這裏是我的刀片如何在laravel中顯示過濾器後的消息?
{!! Form::open(['url'=>'/jobseekers','method'=>'GET', 'class'=>'form', 'id'=>'search_data']) !!}
<div class="form-group col-md-4">
<input type="text" name="fullname" placeholder="Name" value="{{ request()->input('fullname')}}" class="form-control"/>
</div>
<div class="form-group col-md-4">
<input type="text" name="fb_name" placeholder="Fb Name" value="{{ request()->input('fb_name')}}" class="form-control"/>
</div>
<button class="btn btn-flat btn-primary">Search</button>
</div>
{!! Form::close() !!}
,並在我的控制器
public function index(Request $request)
{
$result = null;
if(count($request->all())!=0){
if ($request->has('sub_search')) {
$jobseekers = Jobseeker::Subsearch($request)->paginate(10);
dd($applicant_information);
}else{
$result=Jobseeker::Search($request)->paginate(10);
// dd($orders);
}
}
else{
$jobseekers = Jobseeker::with('calllogs')->orderBy('created_at', 'desc')->paginate(16);
}
return view('backend.jobseekers.index',compact('jobseekers','result'));
}
我使用get方法來過濾,和我想告訴喜歡
個爲全稱和fb_name的搜索結果是:
有沒有辦法做到像我的情況?請指導我,謝謝。
非常感謝bro,它的工作原理。 –
歡迎兄弟:)高興地幫助 – pandesantos