Category: PHP Solutions

Schema Migration in CakePHP 3.x

Posted on April 17, 2017 by in PHP Solutions


In this blog, we’re going to look at the purpose of the schema migration tool provided by CakePHP and the benefits of using it in our project(s).

What does it do

CakePHP provides a plugin called migration which is supported by the core team. This plugin is a wrapper for the database migrations library Phinx.

Using a migration file we can create or drop tables, add or remove columns, create indexes and even insert data into our database. A migration file contains PHP script which handles our schema.

Common mistakes while working with CakePHP index page views

Posted on February 3, 2017 by in PHP Solutions

At some point of time as developers, we all go through a situation where we have a short deadline and a hand-full of work. In such situations if we are working with CakePHP index views, this blog may help you avoid some common mistakes. For this tutorial, we are targetting CakePHP 2 and CakePHP 3.


  • Knowledge on CakePHP views

Handling form submissions in WordPress

Posted on May 7, 2016 by in PHP Solutions

You are planning to write a brilliant plugin. Its’ got a form from which you collect data from the user and register them to your website

In your plugin, to generate the form, you are probably using a shortcode. When the user hits that submit button you’ve to submit that data to the server and register him. There are multiple ways to do this.

We will look at two of these methods, their merits and demerits.

Using “+/-1 Month” with strtotime() function in PHP

Posted on April 24, 2015 by in PHP Solutions

PHP’s date function strtotime is used to parse about any English textual date-time into a Unix time-stamp.

Syntax: int strtotime ( string $time [, int $now = time() ] );


echo strtotime("now");
echo strtotime("+1 month");


Posted on April 4, 2014 by in PHP Solutions

We’ve been working with Behat for one of our clients. It’s a wonderful technology that implements Behavior driven development (BDD) to increase the understanding between the customer and the software developer implementing the solution. It applies a testing based approach to software development. At the very beginning of development, test cases (in a language called Gherkin) are written. A software is only considered complete if it meets and passes these test cases.

We’ll be writing a series of posts to share our knowledge, starting with basic description of some important concepts related to Gherkin and Behat. A sample test case written in Gherkin for Behat could look something like this-