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.
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 install laravel to their local xampp or wamp setup. All you need is having a basic knowledge of command line run and setting system variable paths. Continue reading
I am in a Task model.
I build following options to load the Task and associated User model data. Continue reading
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 application. Continue reading
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 tag but it wont take care of the left-right borders and radii. Continue reading
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 would work as a “ago in words” kind of function as well. Continue reading
I have a database table field defined as decimal(10,5). I want to use it for various purposes so I don’t want to change the datatype. In most of the forms however I want to keep this field showing none or very limited number of decimal points. Continue reading
Following the post (http://goo.gl/PLeNJR) for ACL: Checking Permissions in Views like some others I faced a “undefined index User…” and some other PHP warnings when trying to implement this example. After doing some testing following the working code I came up with. I think it may help some one there. Continue reading
There are many ways to create a dropdown select options list from a given array in any programming language like PHP. Please check how to create a select list from a PHP array. However in this case I will make a note of the steps I usually follow to create a PHP array from a given HTML of select list options. Continue reading
Following an answer (http://goo.gl/EcqpTZ) here’s what I did to setup the Git Bash environment to log me in once when I start it up. This method worked for me to make “remember me” working or to save my password for my local git account so I dont have to type it everytime I want to do a push or pull. Continue reading