Skip to content
Discussion options

You must be logged in to vote

More or less like this

use WebVPF\PlugName\Models\Member;

class MembersAtRisk extends ReportWidgetBase
{
    // ...

    protected function loadData()
    {

      $this->vars['members_list'] = Member::where('is_activated', true)->get();
    }
}

Here is an example with data from the Winter.User plugin: https://github.com/wintercms/wn-user-plugin/blob/7208cc1af5b8d5af6089eb4c08225c84547a0efd/reportwidgets/Statistics.php

Replies: 2 comments 2 replies

Comment options

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

Answer selected by SledgehammerPL
Comment options

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

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