rest\Action findModel()

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 primaryKey() method of the model.

return yii\db\ActiveRecordInterface

The model found

throws yii\web\NotFoundHttpException

if the model cannot be found

doc_Yii
2016-10-30 17:11:00
Comments
Leave a Comment

Please login to continue.