CakePHP: Using Migrations Plugin
How to generate table using Migrations Plugin in CakePHP
1. Download Migrations Plugin for CakePHP here or Clone using Git.
2. Unzip Migrations folder to app\Plugin\
3. Add the plugin to app\Config\bootstrap.php using CakePlugin::load(‘Migrations’);
4. Run this command using CLI:
D:\cake\app>php console/cake.php migrations.migration run all -p migrations
5. For first generate, run command D:\cake\app>php console/cake.php migrations.migration generate
6. Write your table_name, then edit file *.php in app\Config\Migration to write table script.
7. To apply, run comman D:\cake\app>php console/cake.php migrations.migration run status
Git: Basic command to make copy repository
If you want to make copy your repository project using git, you can use command:
$ git init
$ git clone [url]
$ git clone git://github.com/hendra-akmal/cobacake.git
Beauty of Garut
Tata Tengtrem Kertaraharja, that’s the motto of Garut where I was born.
Garut is a county located in the province of West Java, Indonesia. Various tourist attractions, food and souvenirs are interesting and unique you can get here. Well, from the beautiful sights and fresh you can enjoy, such as Situ Cangkuang, Situ Bagendit, Wildlife Tourism Hot Darajat, and much more like a Curug (waterfall ) as well as the beaches in the area and Bungbulang Pameungpeuk.
If your culinary enthusiasts, do not forget the souvenirs typical Garut already global, … Especially if not Dodol. Dodol Garut famous not only in West Java, Indonesia, but has been known to foreign tourists. Dodol Garut now grown to many diverse flavors and lots of innovation, such as Chocodot, Brodol, and much more …
You curious? Immediately coming to Garut, because not only the sights and unique food in Garut, including fashion, waaww .. Garut is also famous for the Leather centered on Sukaregang, so … Come on to Garut ..
Create table in CakePHP using CLI
In CakePHP we can create table generate by console to easy use and quickly.
First, use command “php console/cake.php migrations.migration”,
Then run command “php console/cake.php migrations.migration generate” and then type “create table_name” to create your table.
After that, we have file create_table_name.php on your app, and then run “php console/cake.php migrations.migration run status”, next, enter number of your file create table.
Check your Git setting
If you want to check your setting on Git, you can use command “git config —list” to show all your setting:
$ git config —list