hide records with controller

How can I hide records from my controller? i need to hide the records if the column 'retiro' is not null.

Controller:

   public function retiro (Request $request){
$data = [
'category_name' => 'datatable',
'page_name' => 'miscellaneous',
'has_scrollspy' => 0,
'scrollspy_offset' => '',

];
$records = Registro::where('retiro', '<>', 'on')->get();


return view('retiro',compact('records'))->with($data);
}

if 'retiro' == 'on' should hide the record

the problem is that when printing the records it does not show anything.

enter image description here help pls



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3xX8nRC
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

How to Create Treeview with Bootstrap and jQuery

jQuery Datatables with PHP, MySQL and AJAX Example

How to Add Images to Dropdown List using jQuery