Hi!
I’d like to create an administration area in my Yii framework but I don’t know how to start. Is there a tutorial on how to create one?
Thanks
Hi!
I’d like to create an administration area in my Yii framework but I don’t know how to start. Is there a tutorial on how to create one?
Thanks
Admin panel = admin module (or separate app) + access control.
So if you’re familiar with creating basic apps, admin panel is not a problem.
See documentation for detail info about modules and auth.
Having a module as an admin panel is ok for small apps, for larger ones you’ll have to use sub-apps connected through a common app.
sorry guys, but I still have doubts. I need a more detailed tutorial.
Any particular questions?
I am lost. I need a step-by-step tutorial
Hi
A module is an mini webapp (has seperated mvc) inside your main application
so you could set seperated access.
http://www.yiiframework.com/doc/guide/1.1/en/basics.module
seperated webapp is a new webapp (making a new web application) like the main application but it has
the functionallity that an admin should be.
Go through https://github.com/clevertech/YiiBoilerplate, this is a very comprehensive structure of Yii complex projects which shares common resources like models, libraries, scripts,etc. and simple to modifiy !
and structure is :
[b]backend[/b]
Backend entry point, expected to be your "admin side" of the application.
[b]bin[/b]
Binaries for you to use, including yiic, phing, phpunit and such. Note that while most of binaries are Composer-installed, yiic and selenium launchers are hand-crafted and not supposed to be removed/changed.
[b]carcass[/b]
Configuration for various 3rd-party tools used in project harness, including Vagrant stuff and code style definition for CodeSniffer.
[b]common[/b]
This folder is structured similarly to the traditional protected folder in autogenerated Yii application. You are expected to place the code global to all entry points in common. Backend-, frontend-, and console-specific stuff should go to backend, frontend and console dirs, respectively.
[b]console[/b]
Console entry point, reachable by yiic console runner. Most important stuff here is your migrations, inside console/migrations subfolder.
[b]frontend[/b]
Frontend entry point, expected to be public side of your application.
[b]reports[/b]
All project status reports from various code quality tools will be placed in here. Documentation from APIGen, too. You will not see this directory initially, it's auto-generated when needed.
[b]tests[/b]
Your test harness is here. See details in the README.md there.
[b]vendor[/b]
All third-party dependencies are installed by Composer in here, even Selenium. You will not see this directory initially, it's auto-generated when needed.