I've been looking for a Laravel transformer that will format the fields both ways. Meaning I transform it when I return it to the client and then tran ...
I've been looking for a Laravel transformer that will format the fields both ways. Meaning I transform it when I return it to the client and then tran ...
I am using Fractal Transformers in one of the Laravel based REST API project. I have a $defaultInclude and thus have a function in the Transformer cla ...
I'm trying to figure out how I can parse includes for nested transformers, given the scenario below: I have a controller which sets my ArraySerialize ...
I have this relation: Each user has gallery and gallery hasMany files. Two users can have a gallery of the same date. This is the output JSON respo ...
Quick question, what is the difference between Eloquent: API Resources and Fractal? To me, it looks like the same thing? ...
I'm having a problem with Fractal library. I'm using Spatie\laravel-fractal library which is just wrapper for League\fractal. So... I want to return ...
This is what I get at the moment with Fractal's JsonApiSerializer of Fractal in Laravel: I know you can set the type for the requested resource lik ...
I have an api endpoint that gives a web chat on my front end a list of online friends, however the user id is not included in my json, I would like to ...
How can I include multiple child relationships using ?include=? Example: /store/1?include=books.author:downloads The result would produce: I left ...
I'm using Fractal laravel package as a presentation and transformation layer for complex data output. I wrote a UserTransformer like this : Now ...
I am using fractal package in laravel 5.3. I have a player model who has hasMany relationship with videos, so one player has many videos. Player mode ...
I was wondering if it is possible to define different data for item resource and collection resource. For collection I only want to send ['id', 'tit ...
I have been using laravel to build my APIs. I use transformers to tranform data from model object. Now instead of database, I have a response coming ...
To change the JSON output send by a Laravel 5.4 RESTful API, I make use of the Fractal package by thephpleague. Because pagination will be added in th ...
This is my PostTransformer where I have included relationship This should result with a relationship of comments with meta as well. But the issue ...
Tables: contact, company and a relationship table with a custom pivot attribute company_contact (company_id, contact_id, is_main) Company and Contact ...
Struggling using parseIncludes in https://github.com/thephpleague/fractal. I have two tables, Property and Weeks. Each property has many weeks. Using ...
I'm having trouble implementing Fractal includes. I am trying to include posts with a particular user. All goes well when I add 'posts' to $defaultI ...
I am looking at implementing UUID'd in place of auto-increment id and was wondering if or how I might integrate cursor based pagination with UUID's. ...