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

تعليقات

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

5 Free Black and White Social Media Icons Sets with CSS and HTML

How to Create Treeview with Bootstrap and jQuery

How to Change Apache and MySQL Port Number in XAMPP Localhost