Custom Web Applications to Grow Your Business

(256) 429-8145

Setting different admin group user privileges in Cakephp

There will be a time when a project will necessitate the creation of different levels of ADMIN or GROUP LEVEL: administrator, editor, member etc. First, create a table and name it groups with two columns: id and title. CREATE TABLE IF NOT EXI

How to Create SEO Friendly URLS in Opencart 2 Easy Blog Simple Blog Model

The Easy Blog Simple blog system created for OpenCart Ecommerce platform is wonderful and easy to install. However, the free version does not come with friendly SEO urls. Here is a step by step method to achieve this. 1. Create a function in /a

Create clean seo friendly urls in cakephp beforeSave function

A neat trick in creating seo friendly url in cakephp is to just create a few lines of regex code to clean the data before it is saved. However, you want to perform this task only when you are adding new articles NOT on edit public function befor

Adding and modifying MYSQL Tables in any CAKEPHP controller - NO PHPMyAdmin or Shell Access

There are those moments when as a web developer you will not have access to PHPMyAdmin or access to shell (to build SCHEMA), but critical modification to the database structure and table is needed. Here are some examples of adding and modifying datab

Using regex on cakephp select statement

Here are three examples of using regex on cakephp mysql select statement Include Numbers $this->set('subdivisions', $this->Hsv->find('all', [ 'fields' => array('Subdivision'), 'conditions' => [ 'City' => $homes[0]['Hsv']['City']

Saving users activity in cakePHP controller

Apart from saving user activities in cakePHP beforeSave, you can also save activities in the controller of which you would like to monitor any change in data. Here is a simple code to do just that. But first, create a mysql table 'user_activities'.

Saving User Activities in cakePHP beforeSave function

There are times when you will like to save user activities to get an idea as to who is doing what. You might not want to use a plugin like luggable. Here is a simple way to do it using the beforeSave function. public function beforeSave($options

Simple Cakephp function to force https SSL without using security component

If you want to force certain of your cakePHP webpages to be https and others http, or to use https for logged in users and http for non users, here is a simple script to do just that // add this function to your appController. When the user is not

Cakephp save in foreach loop

CakePHP will only save one record if save in a foreach loop or do while loop is not done properly. The CREATE function and an UNSET should be call before and after each loop iteration foreach($parlar as $par){ $this->request->data['Winner'] =

Baking with cakePHP 3.0 in xampp

If you work with cakePHP you will realize that there are some differences between the 2.0 and 3.0 and a small learning curve. Here are the simple steps to baking with cakephp 3.0 IN Xampp Get to the command prompt via xampp control panel Do