File "StoreProductPriceRequest.php"

Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Requests/Admin/StoreProductPriceRequest.php
File size: 857 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace App\Http\Requests\Admin;

use Gate;
use Illuminate\Foundation\Http\FormRequest;

class StoreProductPriceRequest extends FormRequest
{
    public function authorize()
    {
        return Gate::allows('product_price_create');
    }

    public function rules()
    {
        return [
            'product_id' => [
                'required',
                'integer',
            ],
            'qty_from' => [
                'required',
                'integer',
                'min:1',
                'max:2147483647',
            ],
            'qty_to' => [
                'required',
                'integer',
                'min:1',
                'max:2147483647',
                'gte:qty_from'
            ],
            'price' => [
                'numeric',
                'required',
            ],
        ];
    }
}