You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Laravel Request Docs to generate my technical documentation. I'd love to add support for LQB includes, filters and sorts to this package, but I don't know how to do this.
I would need to return every filter from myModel::allowedFilters(), and while it's easy for the protected static array $allowedFilters variable, I don't know how to extract the rest, when it's defined as is :
public static function allowedFilters(): array
{
return array_merge(
[AllowedFilter::exact('criteria_id')],
[AllowedFilter::exact('groups.id')],
[AllowedFilter::exact('type')],
[AllowedFilter::callback('filter', function (Builder $query, $value) {
...
})],
static::$allowedFilters ?? []
);
}
Ideally, I'd love to know it is is "exact", "partial", .... but this is a bonus :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
I am using Laravel Request Docs to generate my technical documentation. I'd love to add support for LQB
includes
,filters
andsorts
to this package, but I don't know how to do this.I would need to return every filter from
myModel::allowedFilters()
, and while it's easy for theprotected static array $allowedFilters
variable, I don't know how to extract the rest, when it's defined as is :Ideally, I'd love to know it is is "exact", "partial", .... but this is a bonus :)
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions