We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Where can I find a tutorial on how to create an admin area in Phalcon?

Please, provide at least one tutorial (written or video) on a simple admin area separated from other webste with something like "admin" etc. and not only some additional links in the navigation menu.

Thank you.


Why there is no such tutorial at all? Because that is really a BASIC functionality.


@Webdesign29 You mean these 10 sentences?

```txt A multi-module application uses the same document root for more than one module. In this case the following file structure can be used:

Each directory in apps/ have its own MVC structure. A Module.php is present to configure specific settings of each module like autoloaders or custom services:

A special bootstrap file is required to load the a multi-module MVC architecture:

If you want to maintain the module configuration in the bootstrap file you can use an anonymous function to register the module:

When Phalcon\Mvc\Application have modules registered, always is necessary that every matched route returns a valid module. Each registered module has an associated class offering functions to set the module itself up. Each module class definition must implement two methods: registerAutoloaders() and registerServices(), they will be called by Phalcon\Mvc\Application according to the module to be executed.```

Thanks, but I don't consider this to by a tutorial. These sentences are like some "cut-scenes" from a trailer, not an actual end product that is supposed to be seen by a public.

Please, try to be objective and think about that before jumping on a pro Al-Phalcon jihadist wagon.It's a shame that such a revolutionary framework has so few tutorials, documentation and people who are willing to help.

An admin area is just a collection of controllers that perform actions. There is nothing magical about it. You create your admin area the same way as you create your application with your views.

If you clone one of the repos in the Phalcon github (say vokuro) you can alter it the way you want it to produce the admin area you need.

As far as tutorials are concerned, there are plenty around. What you are asking is simple MVC methodology.

As for the people willing to help, the community is here to help; you might want to change your attitude in how you ask things.


@Nikolaos Tutorials are rare. I have watched one by JREAM on Udemy (to the end; but he is not very familiar with it and two videos are still missing; probably not coming soon because of his newborn baby).

Tutorials by Phalcon team are just for show, no real in-depth. And many things are missing. Especially if you are not a pro developer.

E.g. in the video about debugging tool. He didn't mention the most importatnt fact that try catch must be commented. And there are many things like that that are making things harder than they should be.

Most of the tutorials on the internet are snigle module and not multi module examples. At least I don't know about any. Please, post a link to a tutorial (not the 10 sentences paragraph in docs) on multi-modular apps, if you know about something. Thanks.

Your definition about a tutorial is different than mine.

The purpose of a tutorial is to give you a start and from then on for you to work on based on your needs and requirements i.e. to teach you how to do it. It appears what you are looking for is a step by step instruction on how to do X.

Sorry but we do not offer hand holding tutorials as you define them. You are more than welcome to use this forum or the IRC channel to ask questions on where you are stuck. You are more than welcome to ask in StackOverflow also, although if you ever ask questions the way you have done so in this forum you will be banned and ignored.

So, in building this multi module application what have you tried so far?

@Nikolaos , I think what he is just asking is that, is there a way you can show us on how are we going to create an admin functionality where we can put it in a plugin or some sort. For example, in CakePhp, if we want to create an ADMIN functionality, what we do is to create a plugin so we can separate all MVC codes. In that sense, it will not mess the code of the main system. As you know, this is new framework and just like me, I'm always looking for at least a long and a little bit detailed explanation on how to do these things. I hope you don't find my message as offending or I have some attitude but I'm just asking as we are still new in using this framework. I am a CakePhp developer for years and now since we are really looking for a fast and robust framework, we find Phalcon as very promising. :)


@jr2wolfgang, what you ask, implemented in Phalcon using multimodule structure. This problem is described in detail in the documentation. I have a real site, which works with several isolated modules. Site has 3 isolated module - Public, Members and Admin. No obstacle. It was built completely using only and only documentation of Phalcon. You can create a tutorial yourself, or wait until the other is create. Any years, may be. Your choise.

@Oleg, thanks for that answer. No dramas, it was just a question by newbies. Probably I'll do your suggestion to create my own tutorial after I succeeded


The admin area is nothing special. It is controllers with actions just like your own application. So you can have:


and those will be mapped to (controller/action)

IndexController  - indexAction
AboutController - indexAction
AdminController - indexAction
AdminController - userAction

You can always check if the user is logged in and redirect them back to the index (if they try to access the admin area) as well as if the user is allowed to access the admin area.

The best example/tutorial for Access Control List (ACL), login/logout and security is Vokuro (https://github.com/phalcon/vokuro).

Try that and ask away if you get stuck