Ejemplo n.º 1
0
            'text' => $this->text()->notNull(),
            'status' => $this->smallInteger()->notNull()->defaultValue(10),
            'created_at' => $this->integer()->notNull(),
            'updated_at' => $this->integer()->notNull(),
        ], $tableOptions);

        $this->createIndex('idx-comment-object_type-object_id', '{{%comment}}', ['object_type', 'object_id']);
    }

    public function down()
    {
        $this->dropTable('{{%comment}}');
    }
}
<?php 
$hl = HL::end();
?>
                        <?php 
Modal::begin(['header' => '<h2>Comment Migration</h2>', 'id' => 'migration', 'toggleButton' => ['label' => 'View generated migration'], 'closeButton' => ['label' => 'Close'], 'clientOptions' => ['backdrop' => false]]);
?>
                            <?php 
echo $hl->captured;
?>

                        <?php 
Modal::end();
?>
                        <p class="text-muted">
                            Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                        </p>
                        <p class="text-muted">
Ejemplo n.º 2
0
            <a href="/tour" class="thumbnail"><img src="<?php 
echo Yii::getAlias('@web/image/front/tour.png');
?>
" title="Quick Start" alt="Quick Start"/></a>
        </div>
        <div class="col-md-9">
            <h2>Quick Start</h2>
            <p>
                Creating a project with Yii can be done in less than 5 minutes by creating a project using Composer and a project template:
            </p>
            <?php 
HL::begin(['language' => 'bash']);
?>
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
            <?php 
HL::end();
?>
            <p>
                For more information about how to get started with Yii quickly
            </p>
            <div class="row">
                <div class="col-md-3">
                    <a class="btn btn-block btn-primary" href="/tour" role="button">Take the Yii Tour</a>
                </div>
                <div class="col-md-3">
                    <a class="btn btn-block btn-warning" href="/doc/guide" role="button">Read the Guide</a>
                </div>
                <div class="col-md-3">
                    <a class="btn btn-block btn-success" href="#" role="button">Join the Community</a>
                </div>
            </div>