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
<?= DetailView::widget([ | |
'model' => $model, | |
'template' => '<tr><th class="col-sm-2">{label}</th> <td>{value}</td></tr>', | |
'attributes' => [ | |
'full_name', | |
'date_born:date', | |
'address', | |
[ | |
'attribute' => 'sex', | |
'value' => ($model->sex === 1) ? 'Male' : 'Female', |
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 yii\db\Migration; | |
class m170104_184151_users extends Migration | |
{ | |
public function up() | |
{ | |
$tableOptions = null; | |
if ($this->db->driverName === '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
<?php | |
use yii\db\Migration; | |
/** | |
* Handles the creation of table `about`. | |
*/ | |
class m170203_135420_create_about_table extends Migration | |
{ | |
/** |
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 yii\db\Migration; | |
/** | |
* Handles the creation of table `category`. | |
*/ | |
class m170203_135455_create_categories_table extends Migration | |
{ | |
/** |
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 yii\db\Migration; | |
/** | |
* Handles the creation of table `products`. | |
* Has foreign keys to the tables: | |
* | |
* - `category` | |
*/ |
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 yii\db\Migration; | |
/** | |
* Handles the creation of table `product_images`. | |
*/ | |
class m170317_124609_create_product_images_table extends Migration | |
{ | |
/** |
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 | |
$params = require(__DIR__ . '/params.php'); | |
$config = [ | |
'id' => 'vitrine', | |
'basePath' => dirname(__DIR__), | |
'bootstrap' => ['log'], | |
'language' => 'pt-br', | |
'timezone' => 'America/Sao_Paulo', |
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 | |
/** | |
* @link http://www.yiiframework.com/ | |
* @copyright Copyright (c) 2008 Yii Software LLC | |
* @license http://www.yiiframework.com/license/ | |
*/ | |
namespace app\assets; | |
use yii\web\AssetBundle; |
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 | |
/* @var $this \yii\web\View */ | |
/* @var $content string */ | |
use yii\helpers\Html; | |
use yii\bootstrap\Nav; | |
use yii\bootstrap\NavBar; | |
use yii\widgets\Breadcrumbs; | |
use app\assets\AdminAsset; |
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 | |
namespace app\modules\admin\controllers; | |
use Yii; | |
use yii\web\Controller; | |
use yii\filters\VerbFilter; | |
use yii\filters\AccessControl; | |
use app\modules\admin\models\LoginForm; |
OlderNewer