5 years ago

Working on a Laravel 5 CMS

Posted 5 years ago by itstrueimryan

Hello there, cowboys and cowgirls. I'm creating a lightweight CMS in Laravel 5 and I'm having some questions about how I should structure it. Basically, I want to separate the Admin (CMS) part of the site with the Front End stuff that visitors will see. So for views, I just separated them into resources/views/admin and resources/views/site. For controllers, app/Http/Controllers/Admin and app/Http/Controllers/Site. And so on and so forth.

That was going fine until I got to Filters. One issue is that I need a separate GuestFilter for Site and Admin. I could easily just create a new AdminGuestFilter, but then that goes against the current methodology of separating like items into their own folders. If I create separate folders, I have to make sure stuff doesn't break that depends on the current locations for those filters, and I am not knowledgeable enough to know what does and doesn't. I just feel like the more I move around files the higher the chance of something breaking in the future. And then where does it end? Do I separate Providers as well? I've already done it for Requests, and it seems like I'm going overboard, but I'm not really sure.

Should I just continue with this methodology? Or is there some cleaner, more efficient way of separating two connected but different areas of a site? Just seeing if anyone has any ideas :D


Please sign in or create an account to participate in this conversation.