hi i wanna make some file directory for my image file but i got error
mkdir(): No such file or directory
public function save($runValidation = true, $attributeNames = null)
{
if ($this->imageFile) {
$this->image = Yii::getAlias('@frontend/web/storage/products/' . Yii::$app->security->generateRandomString() . '/' . $this->imageFile->name);
}
$transaction = Yii::$app->db->beginTransaction();
$ok = parent::save($runValidation, $attributeNames);
if ($ok && $this->imageFile) {
$fullPath = Yii::getAlias('@frontend/web/storage' . $this->image);
$dir = dirname($fullPath);
if (!FileHelper::createDirectory($dir) | !$this->imageFile->saveAs($fullPath)) {
$transaction->rollBack();
return false;
}
}