{"repo":"flugg/laravel-responder","free":true,"listed":false,"github":"https://github.com/flugg/laravel-responder","clone":"git clone https://github.com/flugg/laravel-responder.git","description":"A Laravel Fractal package for building API responses, giving you the power of Fractal with Laravel's elegancy.","language":"PHP","stars":888,"topics":["laravel","lumen","fractal","responder","api","transformer"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Laravel Responder is a package for building API responses, integrating Fractal into Laravel and Lumen. It can transform your data using transformers, create and serialize success- and error responses, handle exceptions and assist you with testing your responses. Table of Contents - Introduction - Requirements - Installation - Usage - Creating Responses - Creating Success Responses - Creating Transformers - Transforming Data - Creating Error Responses - Handling Exceptions - Contributing - Donating - License Introduction Laravel lets you return models directly from a controller method to convert it to JSON. This is a quick way to build APIs but leaves your database columns exposed. Fractal, a popular PHP package from The PHP League, solves this by introducing transformers. However, it can be a bit cumbersome to integrate into the framework as seen below: Not that bad, but we all get a little spoiled by Laravel's magic. Wouldn't it be better if we could refactor it to: The package will allow you to do this and much more. The goal has been to create a high-quality package that feels like native Laravel. A package that lets you embrace the power of Fractal, while hiding it behind beautiful abstractions. There has also been put a lot of focus and thought to the documentation. Happy exploration! Requirements This package requires: - PHP 7.0 + - Laravel 5.1 + or Lumen 5.1 + Installation To get started, install the package through Composer: Laravel Register Service Provider Append th","default_branch":null,"files":null,"tree":[],"storefront":"/r/flugg","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/flugg/laravel-responder/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}