yii2 equivalent of yii1 model()->findById() construct

123 Views Asked by At

I am a Yii newbie, attempting to convert a Yii1-based Craft plugin to Yii2. In the plugin, there are several uses of the following construct:

return MyRecord::model()->findById($id);

What is the equivalent Yii2 construct, specifically for the model()->findById() part?

0

There are 0 best solutions below