<?php

namespace Packages\Product\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class ProductRequest 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()
    {
//        dd(request()->all());
        return [
            'title' => ['required','max:100'],
            'price' => ['required'],
            'slug' => ['unique:products'],
            'type' => ['required'],
            'status' => ['required'],
            'discription' => ['required'],
            'categories' => ['required'],
//            'featureDescription' => ['required'],
//            'featureCaption' => ['required'],
            'descriptionImg' => ['nullable'],
            'caption' => ['nullable'],
            'gallery_image' => ['nullable'],
            'featured_image' => ['required', 'image', 'mimes:jpeg,jpg,png,gif', 'max:8000'],


        ];

    }

}
