mardi 20 juillet 2021

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



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire