Giter Club home page Giter Club logo

Comments (7)

Dominic28 avatar Dominic28 commented on May 18, 2024

Hey,
You just need to create another controller called "admin" and add methods and a model for it. No rewriting of the parameters is needed.

from mini.

panique avatar panique commented on May 18, 2024

@rhamses , hey, this has nothing to do with the script itself, it's up to you how you build your application. These days it's also common to completely seperate the real user-facing-application and the admin-stuff (as you should never expose your inner-company-admin-stuff to anyone).

I think you could rebuild/restructure parts of your app, in the end it's probably much less stress than going on with the current mix.

To go on with your current mix: As dominic says, simply create a controller "admin" and put all the stuff the admin can do in here. It might result in duplicate/similar code sometimes, but it's much much cleaner.

from mini.

panique avatar panique commented on May 18, 2024

@rhamses IMPORTANT: never use controller/method-names that have dashes in there! A controller/method should always follow the syntax specs of PHP. => It's not possible in PHP to make a controller/class action/method like 'product-stuff()' (or I've totally missed something :) )

from mini.

N-Porsh avatar N-Porsh commented on May 18, 2024

sry for my english. I'm looking for simple mvc framework.. and i was wondreing if it's easy to implement 2 admin panels(site.com/cabinet/...) for authenticated user and for moderators/..(site.com/admin/...).. so basically 3 main pages ... or i will have to rewrite some URL rules for this ?

from mini.

rhamses avatar rhamses commented on May 18, 2024

Thanks for all the answers guys! @panique i realize later that was an mistake give the example with dash on the url. Sorry about that. But it looks like my application isn't build in an right way, and i'm working on to fix that. I start using the project to learning about MVC and back end environment, so right now i'm more aware of best pratices. Thanks again for the project, and thanks for the help o/

from mini.

Dominic28 avatar Dominic28 commented on May 18, 2024

@N-Porsh This is exactly the same what is written above. You just need to create controllers and give them some logic to only show content to the right users. But this is not the right place to discuss this.

from mini.

panique avatar panique commented on May 18, 2024

@rhamses Btw if you need a full login system, try one of my 4 babies here: http://www.php-login.net/ ! php-login is some kind of partner-project and shares lots of the php-mvc's architecture. Might be useful for you.

from mini.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.