<?php $this->registerJs("
$('#pjax-form-cart').on('pjax:end',function(){
$('#deliveryForm .required input').on('blur',function(){
var id= $(this).attr('id');
$('#deliveryForm').yiiActiveForm('validateAttribute', id);
})
});", yii\web\View::POS_READY); ?>
'rules' => [
[
'class' => 'yii\rest\UrlRule',
'controller' => ['v1/bonus'],
'extraPatterns' => [
'GET bonus' => 'get-bonus',
]
]
],
'rules' => [
'class' => 'yii\rest\UrlRule',
'controller' => ['v1/bonus'],
'extraPatterns' => [
'GET bonus' => 'get-bonus',
]
],
public function registerTranslations()
{
Yii::$app->i18n->translations['translit'] = [
'class' => 'yii\i18n\PhpMessageSource',
'sourceLanguage' => 'en-US',
'basePath' => '@vendor/sirgalas/yii2-wordperss-menu/messages',
];
}
Module::t('translit','Menu create')
то есть должно было совпадать translit
вот здесь Yii::$app->i18n->translations['translit']
и вот здесь Module::t('translit','Menu create')
да и не забыть указать адрес полный с vendor
@vendor/sirgalas/yii2-wordperss-menu/messages
<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "fl_actours".
*
* @property integer $id
* @property string $name
* @property string $biography
*/
class FilmsFordate extends \yii\db\ActiveRecord
{
public static function tableName()
{
return 'fl_filmsFordate';
}
}?>
Yii::$app->db->createCommand(" CREATE OR REPLACE VIEW fl_filmsFordate(id,name,created_at) AS SELECT id, name_film, created_at FROM `fl_films`
UNION SELECT id, name_serial, created_at FROM `fl_serial` ORDER BY created_at DESC LIMIT 0 , 20");
$last= FilmsFordate::find()->all();