echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],
'encodeLabels' => false,
'items' => [
['label' => '<i class="fa fa-user"></i> Account', 'url' => ['#']],
['label' => '<i class="fa fa-star"></i> Wishlist', 'url' => ['#']],
['label' => '<i class="fa fa-crosshairs"></i> Checkout', 'url' => ['#']],
['label' => '<i class="fa fa-shopping-cart"></i> Cart', 'url' => ['#']],
Yii::$app->user->isGuest ?
['label' => '<i class="fa fa-lock"></i>'.Yii::t('frontend', 'Login'), 'url' => ['/user/sign-in/login']] :
['label' => '<i class="fa fa-unlock"></i> Logout (' . Html::encode(Yii::$app->user->identity->username) . ')',
'url' => ['/site/logout'],
'linkOptions' => ['data-method' => 'post']],
[
'label'=>Yii::t('frontend', 'Language'),
'items'=>array_map(function ($code) {
return [
'label' => Yii::$app->params['availableLocales'][$code],
'url' => ['/site/set-locale', 'locale'=>$code],
'active' => Yii::$app->language === $code
];
}, array_keys(Yii::$app->params['availableLocales']))
],
],
]);
Featured Posts
วันพฤหัสบดีที่ 29 มิถุนายน พ.ศ. 2560
วันอาทิตย์ที่ 19 กุมภาพันธ์ พ.ศ. 2560
Open Source Shopping Cart Yii2
Open Source Shopping Cart Software
Make it easy for merchants to develop high performance online store and sell the products globally.
http://whatacart.com/
วันเสาร์ที่ 12 พฤศจิกายน พ.ศ. 2559
วันเสาร์ที่ 9 เมษายน พ.ศ. 2559
Yii1 IF
if(!empty($_GET['act']) and $_GET['act']=='update'):
endif;
endif;
วันพฤหัสบดีที่ 7 มกราคม พ.ศ. 2559
yii2-app-advanced
Installing using Composer
composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project --prefer-dist yiisoft/yii2-app-advanced yii-application
https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-installation.md
วันพุธที่ 4 พฤศจิกายน พ.ศ. 2558
วันศุกร์ที่ 24 กรกฎาคม พ.ศ. 2558
Date + 7 Day
$date = "Mar 03, 2011";
$date = strtotime($date);
$date = strtotime("+7 day", $date);
echo date('M d, Y', $date);
http://stackoverflow.com/questions/5174789/php-add-7-days-to-date-format-mm-dd-yyyy
สมัครสมาชิก:
บทความ (Atom)