JeroenvanRensen
JeroenvanRensen

Hi everyone,

I'm new to OctoberCMS and I really like it! But I have one problem: I'm creating a new Blogging plugin with user permissions, and I only want to show the posts made by the authenticated user.

In my Posts controller I don't have any index method, I do it completely using YAML. Does anyone know how to do this?

Thank you! Jeroen

mjauvin
mjauvin

when we ask more details, you do not answer. sorry.

JeroenvanRensen
JeroenvanRensen

I do not see where you ask for more details, but I can give them if you want. What do you want to know?

netsmertia
netsmertia

You can use extend methods or events provided in both FormController and ListController which in actual handle all actions (index, update etc).

    public function listExtendQuery($query) {
            $query->where('user_id', $this->user->id);
 }

Last updated

1-4 of 4