I’m working on a website that has a boring-but-effective scaffold for entering data on the back end. It’s intended to be the admin interface for a yet-to-be-built website with a prettier public face. In my mind, the website would have a url structure something like:
I imagine that there is a “right” cake-ish way to do this. They’re both using the same models and controllers, but the views will be different between the public and admin interfaces. Can someone get me started in thinking about how to structure this? If possible, I’d like to use the url structure described above wherein both versions would use the same model names in different urls.
Or… maybe I’m thinking of this wrong. Maybe this is a routing problem?
Could it be that for a logged in admin-user, /models1 routes to the scaffold, and for a not-logged-in/not-admin-user the same path routes to a public view?
That would have the downside of not being able to see the public interface while you’re logged in as an editor. If that approach would work, though, I’d be interested in seeing an article or tutorial explaining the structure in more detail.
You can use Prefix Routing
You’ll need a special folder for the prefix in controllers & views
Thank you! I’ll take a look and see what I can learn!
Or you can create admin app separately , like
More works , but more flexibility in maintenance time .