1. Go to this page and download the library: Download funson86/yii2-gii library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
funson86 / yii2-gii example snippets
`sort_order` int(11) NOT NULL DEFAULT '50',
`status` int(11) NOT NULL DEFAULT '1',
`created_at` int(11) NOT NULL DEFAULT '1',
`updated_at` int(11) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '1',
`updated_by` int(11) NOT NULL DEFAULT '1',
CREATE TABLE `prefix_test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parent_id` int(11) NOT NULL DEFAULT '0',
`product_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`content` text,
`user_id` int(11) NOT NULL DEFAULT '0',
`type` int(11) NOT NULL DEFAULT '1',
`sort_order` int(11) NOT NULL DEFAULT '50',
`status` int(11) NOT NULL DEFAULT '1',
`created_at` int(11) NOT NULL DEFAULT '1',
`updated_at` int(11) NOT NULL DEFAULT '1',
`created_by` int(11) NOT NULL DEFAULT '1',
`updated_by` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `parent_id` (`parent_id`),
KEY `product_id` (`product_id`),
KEY `created_at` (`created_at`),
KEY `FK_test_plan_id` (`plan_id`),
CONSTRAINT `FK_test_product_id` FOREIGN KEY (`product_id`) REFERENCES `prefix_product` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;