Hello!
When I’m creating action method in controller, I can define get parameters like this:
public function actionIndex($paramName1, $paramName2)
{
return $this->render('index');
}
Here I’m using camelCase convention (because of Yii2 code style) and uri will look like this:
controller/index?paramName1=1¶mName2=2
But when I’m creating a search form with search model, which extends ActiveRecord model, I need to use underscores in attributes names (because of db column names). And uri will be:
controller/search?attribute_name=1&another_attribute_name=2
Am I doing something wrong or it is not a problem to use different styles for GET parameters names?