Answer the question
In order to leave comments, you need to log in
How to add field to gridview and yii2 model?
There is a Users model in it there are fields day, month, year
Created by CRUD these fields are displayed separately in the gridview. How to create a new field birthday, for example, which will not be in the database, but it must be composed of day, month, year and displayed in the grid
Answer the question
In order to leave comments, you need to log in
make a getter method in the model that will form the date of birth, for example:
public function getBirthDay(){
return $this->day . '.' . $this->month . '.' . $this->year;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question