Hey I'm really new to Laravel, I'm creating an application that lets users adopt animals, I have two buttons, one that approves people's adoption requests and one that denies them, the purpose of these buttons would be that approve would change the enum type within my database table from pending to approved and the deny button would change it from pending to denied.
I have a controller for the adoption requests with an update method, my model is called Adoption and the table where the my adoption info is kept is called the adoptionTable. How would I make my buttons preform the required actions?
<form action="" method="post">
@csrf
<input name="animal" type="hidden" value="accepted">
<button class="btn btn-success" type="submit">Accept</button>
</form>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire