Skip to content

Is it possible for the dashboard module count to include a filter? #1037

Answered by pboivin
adam-jones-net asked this question in Q&A
Discussion options

You must be logged in to vote

Cleaning up my answer for the records — You can add the countScope key for specific modules in the dashboard configuration:

'dashboard' => [
        'modules' => [
              'App\Models\Property' => [
                'name' => 'properties',
                'label' => 'Properties',
                'count' => true,
                'countScope' => ['published' => true],

        ...

This would restrict the count to published properties only.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@pboivin
Comment options

@adam-jones-net
Comment options

@pboivin
Comment options

Comment options

You must be logged in to vote
1 reply
@adam-jones-net
Comment options

Answer selected by ifox
Comment options

You must be logged in to vote
0 replies
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