<?php namespace App\Http\Requests;

use App\Http\Requests\Request;

class ProductRequest extends Request
{

	/**
	 * 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 [
			'fruit_id'    => 'required',
			'sort'        => 'required|min:3',
			'category_id' => 'required',
			'amount'      => 'numeric',
			'location'    => 'required|min:3',
			'pictures'    => 'required',            //|mimes:png, gif, jpeg, jpg'
		];
	}

}
