rupadana / filament-api-service

A simple api service for supporting filamentphp
https://filamentphp.com/plugins/rupadana-api-service
MIT License
95 stars 22 forks source link

[Feature]: add allowedIncludes() in PaginationHandler stub #36

Closed eelco2k closed 3 months ago

eelco2k commented 3 months ago

What happened?

missing allowedIncludes

could you add allowedIncludes to the PaginationHandler.stub like so:

$query = QueryBuilder::for($model)
        ->allowedFields($model::$allowedFields ?? [])
        ->allowedSorts($model::$allowedSorts ?? [])
        ->allowedFilters($model::$allowedFilters ?? [])
        ->allowedIncludes($model::$allowedIncludes ?? null)
        ->paginate(request()->query('per_page'))
        ->appends(request()->query());

then it's at least added to the stub as reference..

How to reproduce the bug

.

Package Version

latest

PHP Version

8.3

Laravel Version

10

Which operating systems does with happen with?

No response

Notes

No response

faizananwerali commented 3 months ago

+1

rupadana commented 3 months ago

Released on version 3.1.0