<?php
namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class StorePromotionsRequest extends FormRequest
{
    /**
     * 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 [
            'plajka' => 'max:30|required',
            'color_picker' => 'max:192|required',
            'header' => 'max:192',
            'description' => 'max:192',
            'image' => 'nullable|mimes:png,jpg,jpeg,gif',
            'residental_complex_id' => 'required',
            'main_page_priority' => 'numeric|min:0|max:10|nullable',
            'promotion_page_priority' => 'numeric|min:0|max:10|nullable',
        ];
    }
}
