File "UpdateCartRequest.php"

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

<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class UpdateCartRequest extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'product_id' => [
                'required',
                'integer',
                'exists:products,id',
                'exists:product_attribute_options,product_id',
            ],
            'quantity' => [
                'required',
                'integer',
                'min:1',
            ],
            'customization' => [
                'nullable',
                'json',
            ],
            'attachment' => [
                'nullable',
                'mimes:pdf',
            ],
        ];
    }
}