You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
topnotch_website/app/Http/Requests/OrderRequest.php

33 lines
847 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class OrderRequest extends FormRequest
{
public function rules(): array
{
return [
'customer_id' => ['required', 'exists:customers'],
'internal_po' => ['required'],
'customer_po' => ['required'],
'order_date' => ['required', 'date'],
'due_date' => ['required', 'date'],
'status' => ['required'],
'rush' => ['boolean'],
'new_art' => ['boolean'],
'digitizing' => ['boolean'],
'repeat' => ['boolean'],
'purchased_garments' => ['boolean'],
'customer_supplied_file' => ['boolean'],
'notes' => ['required'],
];
}
public function authorize(): bool
{
return true;
}
}