This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "oshpilaf/ubuntu1404-php52" | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.synced_folder ".", "/var/www", owner: "www-data", group: "www-data", :mount_options => ["dmode=777", "fmode=666"] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.guest = :freebsd | |
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true | |
config.vm.box = "freebsd/FreeBSD-10.2-STABLE" | |
config.ssh.shell = "sh" | |
config.vm.base_mac = "080027D14C66" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace app\controllers; | |
use yii\filters\AccessControl; | |
use yii\web\Controller; | |
class ExampleController extends Controller | |
{ | |
public function behaviors() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'urlManager' => [ | |
'class' => 'yii\web\UrlManager', | |
'showScriptName' => false, | |
'enablePrettyUrl' => true, | |
'rules' => array( | |
'<controller:\w+>/<id:\d+>' => '<controller>/view', | |
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>', | |
'<controller:\w+>/<action:\w+>' => '<controller>/<action>', | |
), | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `catalog` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`product_name` varchar(50) NOT NULL, | |
`product_description` text NOT NULL, | |
`photo` varchar(50) DEFAULT NULL, | |
`price` float(4,2) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; | |
-- -------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `country` VALUES ('AU','Australia',18886000); | |
INSERT INTO `country` VALUES ('BR','Brazil',170115000); | |
INSERT INTO `country` VALUES ('CA','Canada',1147000); | |
INSERT INTO `country` VALUES ('CN','China',1277558000); | |
INSERT INTO `country` VALUES ('DE','Germany',82164700); | |
INSERT INTO `country` VALUES ('FR','France',59225700); | |
INSERT INTO `country` VALUES ('GB','United Kingdom',59623400); | |
INSERT INTO `country` VALUES ('IN','India',1013662000); | |
INSERT INTO `country` VALUES ('RU','Russia',146934000); | |
INSERT INTO `country` VALUES ('US','United States',278357000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `country` ( | |
`code` CHAR(2) NOT NULL PRIMARY KEY, | |
`name` CHAR(52) NOT NULL, | |
`population` INT(11) NOT NULL DEFAULT 0 | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
NewerOlder