samedi 7 août 2021

Generic Model Based CRUD API Laravel

Is there a built in or library based way to implement generic Eloquent/Model based views in Laravel for simple CRUD endpoints?

At the moment I am writing the logic for index, store, destroy, update manually, but all the code is essentially the same.

e.g.

public function destroy($id)
{
  $customer= CustomerInfo::find($id);
  $customer->delete();
}  

I'm more used to Django and the DRF which implements a ModelViewSet class which handles all (most) of the logic for simple CRUD applications.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2VCLjJC
via IFTTT

Aucun commentaire:

Enregistrer un commentaire