есть 2 приложения на Yii2. Они состоят из "common"
# Если запрос не начинается с web, добавляем его
RewriteCond %{REQUEST_URI} !^/(web)
по инструкции yii2 точь в точь переписал simple yii application
->addHeaders(['content-type' => 'application/json']
'baseUrl'
задали?->select('field')->...
$query = Zakaz::find()->select('name', 'phone', 'email' )->....
$query = Zakaz::find()->select('zakaz.name', 'zakaz.phone' )->....
это же сократит время вывода данных как понимаю?
['label' => 'Блог', 'url' => ['/blog/index']],
['label' => 'Обучающие видео', 'items' => [
['label' => 'Cat', 'url' => ['/cat/index'], 'active' => $this->context->id == 'cat'],
['label' => 'Cat', 'url' => ['/cat/index'], 'active' => $this->context->id == 'cat'],
['label' => 'Cat', 'url' => ['/cat/index'], 'active' => $this->context->id == 'cat'],
['label' => 'Cat', 'url' => ['/cat/index'], 'active' => $this->context->id == 'cat'],
]],
use yii\db\Migration;
class m150101_185401_create_news_table extends Migration
{
public function init()
{
$this->db = 'db2';
parent::init();
}
}
foreach ($component->getDamages($car->id) as $damages) { echo $damage->name; }
foreach ($component->getDamages($car->id) as $damage) {
$dataProvider = new ActiveDataProvider([
'query' => Page::find()->where(['enabled' => 1]),
'pagination' => array('pageSize' => 50),
]);
echo \yii\widgets\LinkPager::widget([
'pagination'=>$dataProvider->pagination,
]);