Я пытаюсь отфильтровать, используя Form :: select (выпадающий список)
Контроллер
public function mappingReport(Request $request)
{
$data['title'] = 'Bbnaija One Time Billings';
$billings = DB::table('bbnaija_one_time_billings')
->select(
'msisdn',
'trans_id',
'ext_id',
DB::raw('created_at as created_date'),
'amount',
'is_complete_transactions',
'billing_channel'
)
->orderByRaw('created_at DESC');
$render=[];
if(isset($request->billing_channel))
{
$billings=$billings->where('billing_channel','like','%'.$request->billing_channel.'%');
$render['billing_channel']=$request->billing_channel;
}
$billings= $billings->orderBy('created_at','DESC');
$billings= $billings->paginate(15);
$billings= $billings->appends($render);
$data['billings'] = $billings;
return view('report.bbnaijaonetimebillingsReport',$data);
}
View
<div class="row" style="margin-bottom: 10px">
{{ Form::model(request(),['method'=>'get']) }}
<div class="col-sm-2">
{{ Form::select('billing_channel',['fke'=>'fke','Airfrik'=>'Airfrik','Airmat'=>'Airmat','Airlet'=>'Airlet'],null,['class'=>'form-control','placeholder'=>'Select Channel']) }}
</div>
<div class="col-xs-2">
{{ Form::submit('Search',['class'=>'btn btn-warning']) }}
</div>
{{ Form::close() }}
</div>
Где у меня есть проблема в представлении Форма :: Выбрать.
Я хочу объединить
'Airfrik' => 'Airfrik', 'Airmat' => 'Airmat', 'Airlet' => 'Airlet'
как единое целое. Это Airlet. Если пользователь выбирает Airlet, он видит его как Airfrik, Airmat и Airlet.
Как мне этого добиться, пожалуйста.