This commit is contained in:
2026-05-01 23:40:14 +08:00
commit b8f599a617
3867 changed files with 478663 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace Illuminate\Validation\Rules;
class ImageFile extends File
{
/**
* Create a new image file rule instance.
*
* @param bool $allowSvg
*/
public function __construct($allowSvg = false)
{
if ($allowSvg) {
$this->rules('image:allow_svg');
} else {
$this->rules('image');
}
}
/**
* The dimension constraints for the uploaded file.
*
* @param \Illuminate\Validation\Rules\Dimensions $dimensions
* @return $this
*/
public function dimensions($dimensions)
{
$this->rules($dimensions);
return $this;
}
}