throw new NotFoundHttpException('The requested page does not exist.'); } protected function findProduct($slug) { if (($model = Products::findOne(['slug' => $slug])) !== null) { return $model; } throw new NotFoundHttpException('The requested page does not exist.'); } }
$_GET = [ 'slug' => 'thiet-bi-loc-bon-rua-watek-ecomac-hq9-1e-ecomac-binh-duong-th-hcm-ha-noi-nhap-khau-toan-quoc', ];