The package provides a nice and easy wrapper around Fractal for use in your Laravel applications. If you don't know what Fractal does, take a peek at their intro. Shortly said, Fractal is very useful to transform data before using it in an API. Transforming right from a Laravel collection is particularly useful for Eloquent results. You can transform directly from a Laravel collection as well. There's also a very short syntax available to quickly transform data. Lovers of facades will be glad to know that a facade is provided. You can add methods to the Fractal class using Laravel's Macroable trait. Imagine you want to add some stats to the metadata of your request, you can do so without cluttering your code. You can run the make:transformer command to quickly generate a dummy transformer. By default it will be stored in the app\Transformers directory.

Features

  • Using Fractal data can be transformed
  • For Laravel and Lumen
  • The laravel-fractal package makes the process easier
  • The package has support for Fractal's serializers
  • All available options are explained in the readme
  • Transforming right from a Laravel collection is particularly useful

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Laravel Fractal

Laravel Fractal Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Laravel Fractal!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Software Development Software

Registered

2022-03-22