Найдено 162 результата
- 2020.02.19, 17:18
- Форум: Общие вопросы (Yii 2.x)
- Тема: Что сдесь неправльно?
- Ответы: 5
- Просмотры: 1343
Re: Что сдесь неправльно?
нужно юзера добавлять автоматически
- 2020.02.19, 17:15
- Форум: Общие вопросы (Yii 2.x)
- Тема: Что сдесь неправльно?
- Ответы: 5
- Просмотры: 1343
Re: Что сдесь неправльно?
Код: Выделить всё
public function beforeSave($insert)
{
if ($insert) {
$this->user_id = Yii::$app->user->id;
}
return parent::beforeSave($insert);
}
- 2020.02.19, 16:24
- Форум: Общие вопросы (Yii 2.x)
- Тема: Что сдесь неправльно?
- Ответы: 5
- Просмотры: 1343
Что сдесь неправльно?
public function beforeSave($insert)
{
if ($insert) {
$this->user_id = Yii::$app->user->id;
return true;
}
return false;
}
{
if ($insert) {
$this->user_id = Yii::$app->user->id;
return true;
}
return false;
}
- 2019.12.29, 17:31
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
кинул в корень views. А если лежит в конкретной папке, например history-balance? в корне понятно, а вот с другой папки вида
- 2019.12.29, 17:30
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
только получилось вызвать с папки
- 2019.12.29, 17:30
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
все заработало
- 2019.12.29, 15:41
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
В этой теме нужно было отобразить последние 30 записей для person в файле view. Откуда теперь здесь появился другой контроллер и другой экшн? Не вижу смысла выносить информацию из index в файл new, т.к. предположительно такого же GridView с таким же набором полей у тебя нигде не будет, а если и буд...
- 2019.12.29, 15:34
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
У меня не получается использовать код в разных местах, чтоб гридвью вынести
- 2019.12.29, 15:34
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
он у меня есть уже в другом месте и работал
- 2019.12.29, 15:14
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
Я сделал экшен чтоб проверить. Один экшен потом удалю.
- 2019.12.29, 15:13
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
Я Вас не очень понимаю . Всмысле с новыми ошибками создать?
- 2019.12.29, 12:11
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
in /web/yii2/vendor/yiisoft/yii2/helpers/BaseHtml.php at line 2276 2267226822692270227122722273227422752276227722782279228022812282228322842285 * See [[getAttributeName()]] for explanation of attribute expression. * * @param Model $model the model object * @param string $attribute the attribute name...
- 2019.12.29, 11:21
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
подскажите пожалуйста
- 2019.12.29, 10:46
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
Call to a member function formName() on null index.php <?php use common\models\HistoryBalance; use yii\helpers\ArrayHelper; use yii\helpers\Html; use yii\widgets\ListView; /* @var $this yii\web\View */ /* @var $searchModel backend\models\HistoryBalanceSearch */ /* @var $dataProvider yii\data\ActiveD...
- 2019.12.28, 17:20
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
можете навести хоть на путь
- 2019.12.27, 22:49
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
- 2019.12.27, 22:20
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
<?php use common\models\HistoryBalance; use yii\helpers\ArrayHelper; use yii\helpers\Html; use yii\widgets\ListView; /* @var $this yii\web\View */ /* @var $searchModel backend\models\HistoryBalanceSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'History B...
- 2019.12.27, 22:20
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
- 2019.12.27, 22:19
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
<?php use common\models\HistoryBalance; use yii\grid\GridView; use yii\helpers\Html; /* @var $this yii\web\View */ /* @var $searchModel backend\models\HistoryBalanceSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ ?> <div class="history-balance-index"> <?= GridView::widget([...
- 2019.12.27, 22:15
- Форум: Общие вопросы (Yii 2.x)
- Тема: ParseError syntax error, unexpected ';', expecting ']'
- Ответы: 141
- Просмотры: 27810
Re: ParseError syntax error, unexpected ';', expecting ']'
логично
а что нужно ?
а что нужно ?