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' => 'may-rua-chen-kuchen-kupp-70353-binh-duong-may-rua-chen-kupp-70363-dung-tich-lon-cuc-ky-tien-loi-binh-duong', ];