mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
42 lines
856 B
PHP
42 lines
856 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Orders\Standards\Validators;
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
use App\Classes\Modules\Orders\DataTransferObjects\OrderObject;
|
|
|
|
class UpdateCurrentStepValidation extends AbstractValidation
|
|
{
|
|
/**
|
|
* @param OrderObject $object
|
|
* @return array
|
|
*/
|
|
protected function data($object): array
|
|
{
|
|
return [
|
|
'id' => $object->getId(),
|
|
'current_step' => $object->getCurrentStep(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @param string $type
|
|
* @return array
|
|
*/
|
|
protected function rules(?string $type = 'POST'): array
|
|
{
|
|
return [
|
|
'id'=> 'required|numeric',
|
|
'current_step'=> 'required',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|