Skip to content

How to filter base on multiple meta fields? #1844

Answered by erikn69
Temepest74 asked this question in Q&A
Discussion options

You must be logged in to vote

I don't know what means metadata for you, and there is no results for metadata on docs, but on params you can set all the filters that you need

protected static function getPermissions(array $params = [], bool $onlyOne = false): Collection
{
return app(PermissionRegistrar::class)
->setPermissionClass(static::class)
->getPermissions($params, $onlyOne);
}

Example

$filtered = Permission::getPermissions(['name' => 'your_name', 'guard_name' => 'web', 'type' => 'Main']);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Temepest74
Comment options

Answer selected by Temepest74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants