khuram/laravel-rest-framework

The simple, easy and plug to play Laravel Rest Framework inspired by Django Rest Framework.

Downloads

1

Stars

0

Version

LRF logo

LRF (Laravel Rest Framework)

Status GitHub Issues GitHub Pull Requests License


LRF allows you to integrate the Permissions, Filters, Filtered Querysets per action, Validation with Laravel (Lumen) as used in Django Rest Framework (DRF).

📝 Table of Contents

🧐 About

I have been developing using laravel for 4 years and got the chance to use Django and DRF. I like the way DRF allows to attach and handle Permissions, Filters, Validation and very easy (inital) CRUD with the help of mixins nicely used with views (controllers in Laravel). So when I came back to Laravel I had the options like Gates and Policy to authorize the users. But I wanted to have something like DRF provides for the Permissions and Filters and a nicely filtered querySet for each of your requests and it can further be filtered for role bases. So getting that idea, of using Permissions, Filters, Validation etc, from DRF, I decided to make something like that for Laravel (and later for Lumen).

This will help those who are coming from DRF to Laravel or those who want an easy way to implement permissions and filter for the incoming requests. Also, it will give a new dimention to the Laravel community.

Another nice thing about this package is you only need to run the lrf:model --all and it will create Controller, Model, ApiRequest (FormRrequest), Resources, Permission and Filter. To start the crud for the newly create model, you only need to write the migration, add fillable fields in the fillable array of the model, add the resource route in the api route and you are ready to CRUD with Laravel :-)

✍️ Authors

See also the list of contributors who participated in this project.

🎉 Acknowledgements

  • Laravel's extension
  • Inspired from Django Rest Framework
mkhuramj

Author

mkhuramj