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

تعليقات

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

How to Create Treeview with Bootstrap and jQuery

jQuery Datatables with PHP, MySQL and AJAX Example

How to Add Images to Dropdown List using jQuery