All Questions

22
votes
5answers
28806 views

Yii2 htaccess - How to hide frontend/web and backend/web COMPLETELY

I think I am pretty close. I have the htaccess redirecting to the website (frontend/web) and the /admin path (backend/web). The site appears fine, CSS files loading, etc. If you go to: http://localho...
37
votes
2answers
23695 views

Multiple database connections and Yii 2.0

I have two databases, and every database has the same table with the same fields, but how do I get all records from all of two databases at the same time in Yii 2.0?
48
votes
9answers
61116 views

Enable clean URL in Yii2

How can I enable clean urls in Yii2. I want to remove index.php and '?' from url parameters. Which section needs to be edited in Yii2 for that?
13
votes
4answers
14189 views

Yii2 REST query

Hy. I have a ProductController which extends the yii\rest\ActiveController. Question is that how can i make querys via HTTP GET request. Like: http://api.test.loc/v1/products/search?name=iphone And...
18
votes
3answers
12499 views

Install Yii2 extension manually without using Composer

I want to install Select 2 extension widget manually with Yii2 Framework without using composer. I done the following steps but it's not working. 1) Added yii2-widget-select2 to vendor/yii-soft 2) ...
25
votes
3answers
16592 views

How to use events in yii2?

I've been through the documentation and all the articles on Yii2 events found using Google. Can someone provide me a good example of how events can be used in Yii2 and where it may seem logical?
8
votes
1answers
4282 views

LIMIT is not working in ActiveDataProvider

Hi guys i am using following code and the limit doesnt work, but if i see the command than it shows limit in that but when i pass the query to ActiveDataProvider it fetch all the records $data= User:...
9
votes
2answers
19898 views

How to implement Yii2 Modal Dialog on Gridview view and update button?

I would like to implement Yii2 modal dialog box on my gridview when view or update button is clicked at each row. Can anyone kindly advise on how to implement it? With advice from arogachev: This is...
25
votes
4answers
23995 views

Disable CSRF validation for individual actions in Yii2

Is there a way to disable CSRF validation for some actions of the controller keeping it enabled for the other ones? In my case I have several configurable Action classes, that are intended to be inje...
22
votes
1answers
9499 views

Yii2 : ActiveQuery Example and what is the reason to generate ActiveQuery class separately in Gii?

Could you provide an example usage. Description will be highly appreciated. I can not find a good example for it.

Previous Next