Вход Регистрация
Файл: vendor/laravel/framework/src/Illuminate/Validation/Rules/ImageFile.php
Строк: 31
<?php

namespace IlluminateValidationRules;

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  IlluminateValidationRulesDimensions  $dimensions
     * @return $this
     */
    
public function dimensions($dimensions)
    {
        
$this->rules($dimensions);

        return 
$this;
    }
}
Онлайн: 1
Реклама