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

تعليقات

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

BlueHost Web Hosting Review: Secrets Revealed for Shared Hosting

How to Create Treeview with Bootstrap and jQuery

Submit Form using jQuery AJAX and PHP without Page Refresh