It can be said that WordPress is the best blogging, News and Magazine software at present. Most of the hosting solutions provide an easy way to install WordPress for you. To create a new website you just need to buy…
CakePHP: switching between multiple databases
Relating to a post I submitted a while back, along with creating a data connection on the fly I had to switch between two connections. That is, file based default connection and a dynamic connection based on user. Here is…
Remove remote directory from repository after adding it to .gitignore
I had a directory named sites added to my git repository. As it contained a bootstrap file having names of each new domain in multiple sites setup hosted in the single CakePHP application it contained different domain entries and folders…
Cakephp generate plugin schema
As you know one would generate the cakephp table schema as: $ cake schema generate
CakePHP Create Datasource on the fly
Want to switch between different databases in a CakePHP action? Do you want to use different database for different clients or sites? Don’t worry the solution more simpler than you thought it to be. Following this link and few other similar…
Install Laravel on Windows – 3 minutes install
Install Laravel on Windows – 3 minutes install Install laravel via composer installer on windows xampp or wamp Laravel 5 can be installed via composer on all operating systems like Windows, ubuntu, mac. Using the following quick guide one can…
Contain and selected fields of model with User _attachAttributes
I am in a Task model. I build following options to load the Task and associated User model data.
CakePHP deleteButton when SoftDelete Behavior in Effect
Here is a piece of code placed as a helper function. Useful to create a delete button/link while having SoftDeleteBehavior enabled for a Model. For example, placed in data management page (view page such as admin_index.ctp or index.ctp) of your…
Bootstrap 3 List group horizontal
This page http://goo.gl/262QmJ has a css to make a list-group floating horizontally and sticking together like it does for list-group to render vertically by default. In order to float list-group-items float horizontally one may add a “list-inline” style to UL…
Fully-formatted Time Difference between two Dates
An useful php function to calculate a time difference between two dates given in sql format. If the newer date is not passed as second argument it would calculate the different between the old date and current time. So it…