File "StoreCartRequest.php"
Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/app/Http/Requests/User/StoreCartRequest.php
File size: 935 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\Http\Requests\User;
use App\Rules\AttributeOptionBelongsToAttribute;
use App\Rules\ValidateProductPrice;
use Illuminate\Foundation\Http\FormRequest;
class StoreCartRequest extends FormRequest
{
public function rules()
{
return [
'product_id' => [
'required',
'integer',
'exists:products,id',
],
'price_id' => [
'required',
'integer',
'exists:product_prices,id',
new ValidateProductPrice,
],
'quantity' => [
'required',
'integer',
'min:1',
],
'customization' => [
'nullable',
'json',
],
'attachment' => [
'nullable',
'mimes:pdf',
],
];
}
}