CakePHP 1.3.3 Admin Section Template Files
I've been getting to grips with the newest release of CakePHP which at the time of writing is 1.3.3. The first thing I usually do on an application is get a simple Admin section underway and here it is.
Everything has been included in a single zip file but you must first go through the motions of creating the database and update the database.php file as well as change a few things in the core.php file.
Creating the Database
I've included the schema in the zip file but here it is for convenience:
CREATE DATABASE IF NOT EXISTS `cakephp_133`; USE `cakephp_133`; /*Table structure for table `cake_sessions` */ DROP TABLE IF EXISTS `cake_sessions`; CREATE TABLE `cake_sessions` ( `id` varchar(255) NOT NULL DEFAULT '', `data` text, `expires` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ); /*Table structure for table `users` */ DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) DEFAULT NULL, `password` varchar(40) DEFAULT NULL, `last_login` datetime DEFAULT '0000-00-00 00:00:00', `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) );
Updating Core files
Enter your database Username/Password into the /app/config/database.php file and change the security salt and cipherSeed variables in the /app/config/core.php file and you should be good to go.
What the template app provides
- Register,Login,Logout functionality
- All admin routes are protected and a user must be logged in to access them
- Simple User management
- View/Add/Edit/Delete/ Users
I've zipped up the entire application and you can download it in a file called: cakephp-1.3.3-admin-section-template.zip. Any thoughts, comments or changes just let me know and I'll consider them.
UPDATE 22/09/10: Zip file has been updated to reflect fix from the comments. Cheers for pointing that one out!
Posted on 1st September 2010
7 years, 3 weeks, 4 days ago