src/controllers/AdminController.php 1 location
|
@@ 126-133 (lines=8) @@
|
| 123 |
|
* @return Admin the loaded model |
| 124 |
|
* @throws NotFoundHttpException if the model cannot be found |
| 125 |
|
*/ |
| 126 |
|
protected function findModel($id) |
| 127 |
|
{ |
| 128 |
|
if (($model = Admin::findOne($id)) !== null) { |
| 129 |
|
return $model; |
| 130 |
|
} else { |
| 131 |
|
throw new NotFoundHttpException('The requested page does not exist.'); |
| 132 |
|
} |
| 133 |
|
} |
| 134 |
|
} |
| 135 |
|
|
tests/controllers/AdminController.php 1 location
|
@@ 105-112 (lines=8) @@
|
| 102 |
|
* @return Admin the loaded model |
| 103 |
|
* @throws NotFoundHttpException if the model cannot be found |
| 104 |
|
*/ |
| 105 |
|
protected function findModel($id) |
| 106 |
|
{ |
| 107 |
|
if (($model = Admin::findOne($id)) !== null) { |
| 108 |
|
return $model; |
| 109 |
|
} else { |
| 110 |
|
throw new NotFoundHttpException('The requested page does not exist.'); |
| 111 |
|
} |
| 112 |
|
} |
| 113 |
|
} |
| 114 |
|
|