findModel() public method
Returns the data model based on the primary key given.
If the data model is not found, a 404 HTTP exception will be raised.
| public yii\db\ActiveRecordInterface findModel ( $id ) | ||
|---|---|---|
| $id | string | 
 The ID of the model to be loaded. If the model has a composite primary key, the ID must be a string of the primary key values separated by commas. The order of the primary key values should follow that returned by the   |  
| return | yii\db\ActiveRecordInterface | 
 The model found  |  
| throws | yii\web\NotFoundHttpException | 
 if the model cannot be found  |  
Please login to continue.