$post = Post::find()->where(['id' => $id])->one();
$post = Post::findOne($id); $post->title = 'New title'; $post->save();
$post = Post::findOne($id); $post->delete();The above examples are just a few of the functionalities provided by Yii2 db ActiveRecord. Yii2 db ActiveRecord is part of the Yii2 framework and is included when you install the framework. It is an open-source package library and is available on GitHub.