Yii2. Access to higher level folder

Step : 1 First create .htaccess file in here yii-application1/.htaccess Options +FollowSymlinks RewriteEngine On # deal with backend first RewriteCond %{REQUEST_URI} /(backend) RewriteRule ^backend/assets/(.*)$ backend/web/assets/$1 [L] RewriteRule ^backend/css/(.*)$ backend/web/css/$1 [L] RewriteRule ^backend/image/(.*)$ backend/web/image/$1 [L] RewriteCond %{REQUEST_URI} !/backend/web/(assets|css|image)/ RewriteCond %{REQUEST_URI} /(backend) RewriteRule ^.*$ backend/web/index.php [L] RewriteCond %{REQUEST_URI} /(assets|css|js|img|font) RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L] RewriteRule ^css/(.*)$ frontend/web/css/$1 [L] … Read more

LIMIT is not working in ActiveDataProvider

Here is what happens when preparing models in yii\data\ActiveDataProvider: /** * @inheritdoc */ protected function prepareModels() { if (!$this->query instanceof QueryInterface) { throw new InvalidConfigException(‘The “query” property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses.’); } $query = clone $this->query; if (($pagination = $this->getPagination()) !== false) { … Read more