tomatophp / filament-api

Generate APIs from your filament resource using single line of code
https://tomatophp.com/en/open-source/filament-api
MIT License
21 stars 1 forks source link

Not working with relations in columns #5

Open toonvd opened 1 month ago

toonvd commented 1 month ago

If you add a column with a relation (for example page.number in a books resource), the query breaks because there is no join. I fixed this by using the model instead of the query builder. EG:

$query = app($page::getResource()::getModel());

The model does understand requesting relation columns. I can make a PR if wanted.

Upvote & Fund

Fund with Polar

linear[bot] commented 1 month ago

TOT-102 Not working with relations in columns

toonvd commented 1 month ago

It seems that when going straight for the model, it just ignores any mutations. Am still debugging

3x1io commented 1 month ago

yes, I think . is not supported! feel free to open a PR