Hello, as my title suggests, I am trying to extend the user plugin with a function.

I have checked And I have also tried implementing it, but I wasn't successful. Could anyone help me how to properly do this?


Lol, I posted this after scouring the site for 2 days.

But 6 mins after posting it, I found the solution:

This is pretty much it:

 $model->addDynamicMethod('getTest', function() use ($model) {
               /* this is where you write the function */
            return something;

Last updated

1-2 of 2