%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/news/app/Http/Requests/Media/
Upload File :
Create Path :
Current File : /var/www/html/news/app/Http/Requests/Media/UploadImageRequest.php

<?php

namespace App\Http\Requests\Media;


use App\Http\Requests\BaseRequest;
use App\Models\Media;

class UploadImageRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'source'    => 'required|string',
            'type'      => 'required|string|in:' .
                Media::MEDIA_TYPE_IMAGE_PROFILE . ',' .
                Media::MEDIA_TYPE_IMAGE_FEATURE . ',' .
                Media::MEDIA_TYPE_IMAGE_SLIDER . ',' .
                Media::MEDIA_TYPE_VIDEO . ',' .
                Media::MEDIA_TYPE_IMAGE_CATEGORY . ',' .
                Media::MEDIA_TYPE_IMAGE_LOGO . ',' .
                Media::MEDIA_TYPE_IMAGE_FAVICON,
            'file_name' => 'required|string'
        ];
    }

    public function getSanitationRules()
    {
        return [];
    }
}

Zerion Mini Shell 1.0