jeudi 27 août 2020

How to maintain the old input value in checkbox after validating by an update request using laravel?

when i open the edit page it should have the value from the database and when i change the value and if in case validaton fails, i need the value to persist. This is the code :

<input type="checkbox" id="show_in_website" name="show_in_website"  @if($data->show_in_website=='1') checked @endif>Show in Website
       



Aucun commentaire:

Enregistrer un commentaire