Ilesyt
Ilesyt

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

I have checked https://octobercms.com/docs/plugin/extending And I have also tried implementing it, but I wasn't successful. Could anyone help me how to properly do this?

Ilesyt
Ilesyt

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

But 6 mins after posting it, I found the solution: https://octobercms.com/docs/services/behaviors

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