This file contains 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 | |
use Phinx\Migration\AbstractMigration; | |
use Phinx\Db\Adapter\MysqlAdapter; | |
class CartItems extends AbstractMigration { | |
public function up() { | |
$table = $this->table('cart_items'); | |
$table->addColumn('user_id', 'integer') |
This file contains 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 | |
use Phinx\Migration\AbstractMigration; | |
class CreatePostsTable extends AbstractMigration { | |
public function up() { | |
$table = $this->table('posts'); | |
$table->addColumn('title', 'string') | |
->addColumn('slug','string') | |
->addIndex(array('slug'), array('unique' => true)) |
This file contains 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
$categories = $CategoryModel->find('threaded', array( | |
'conditions' => array( | |
'Category.home' => true, | |
'Category.visible' => true, | |
'Category.active' => true, | |
), | |
)); | |
foreach ($categories as $item) { | |
extract($item); |
This file contains 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
/** | |
* Documentation: http://docs.azk.io/Azkfile.js | |
*/ | |
// Adds the systems that shape your system | |
systems({ | |
wordpress: { | |
// Dependent systems | |
depends: ['mysql'], | |
// More images: http://images.azk.io | |
image: {"docker": "azukiapp/php-fpm"}, |
This file contains 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
define('DB_NAME', getenv('MYSQL_DATABASE')); | |
define('DB_USER', getenv('MYSQL_USER')); | |
define('DB_PASSWORD', getenv('MYSQL_PASSWORD')); | |
define('DB_HOST', getenv('MYSQL_HOST') . ':' . getenv('MYSQL_PORT')); |
This file contains 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
/** | |
* Documentation: http://docs.azk.io/Azkfile.js | |
*/ | |
// Adds the systems that shape your system | |
systems({ | |
paypal: { | |
// Dependent systems | |
depends: ['mysql'], | |
// More images: http://images.azk.io | |
image: {"docker": "azukiapp/php-fpm:5.6"}, |
This file contains 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
#!/bin/bash | |
#Por : Lucas Macedo | |
#se você usar apenas usuário sem senha, use este linha abaixo | |
usuarioesenha="-u root -proot" | |
#pasta para exportação do banco | |
pasta_backup="/Users/Lucas/backup_banco" | |
#define o path do mysql, se estiver global deixe apenas "mysql" ex: C:\wamp\bin\mysql\mysql5.6.12\bin\mysql |
This file contains 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
#!/bin/bash | |
#By: Lucas macedo | |
#Defina seu usuário e senha | |
usuarioesenha="-u root -proot" | |
#define o path do mysql, se estiver global deixe apenas "mysql" ou wamp/mamp ex: C:\wamp\bin\mysql\mysql5.6.12\bin\mysql | |
_mysql="/Applications/MAMP/Library/bin/mysql" | |
#busca todas databases | |
databases=(`$mysql -e "show databases" ${usuarioesenha}`) |
This file contains 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
#!/bin/sh | |
WEBROOT=~/laravelapp | |
GIT_WORK_TREE=$WEBROOT git checkout -f | |
#change directory to the project dir | |
cd $WEBROOT | |
# Check if a composer.json file is present | |
if [ -f composer.json ]; then |
This file contains 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
products: | |
------------------ | |
| id | name | | |
------------------ | |
| 1 | t-shirt | | |
------------------ | |
variants: | |
------------------------------ | |
| id | product_id | name | |
OlderNewer