First sorry for bad english!
I'm testing a RESTful API in YII2 and it's so easy to create, following the official guide. But by default (as far as I know) i can only pass the id as param to get a specific record.
For example, supposing that i have the following table called person:
id, name, age, gender, email, phone
In this case, i can only filter by id, like this: http://myserver/api/persons/1
I need to know how to filter by other field, like age or gender for example.
My Controller:
class PersonController extends ActiveController
{
public $modelClass = 'app\models\Person';
}
Thank You!