Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jalaf11201's avatar

I'm having problems on deciding an architecture for sub navs, and I'm having trouble on deciding how to manage the page without refresh without messy code.

I'm creating a community based SN, I created manage section for community owners, and there is nav on top like general, privacy, sections (flairs), users (follow, requests), posts (requests, pinned, etc.) inside. I created blade pages for them, but inside them there are sections again. Like Followed, Requests, Pinned, Removed etc. Making separate pages for them would be bad. I don't know if I should just send arguments ?filter=request and display it based on that. What would be professional way for this type of sub sections (navs)?

Also after creating some things I just realized that I have to make sure the page is not getting refresh with the actions like follow, pin, remove, reject, accept etc. There are tons of them, I did follow, delete with the async fetching with js. And also realized I have to fetch posts with it too because of pagination. I don't want it to refresh for next other 20 posts every time. I'm wondering if it would be ok to use tons of async fetch and dom manipulation in the page.

I'm doing this with laravel and without front frameworks. I am having trouble on how to do the architecture so it won't bite me back. I would appreciate your suggestion and examples on these things.

Edit: also, which is the better way, using toggle on action like ban/unban, like/dislike, follow/un, pin/unpin, or creating separate routes and functions for them?

0 likes
0 replies

Please or to participate in this conversation.