Files
wticreatorstudio/Modules/Shipping/Http/Requests/CreateShippingRequest.php
T
2024-02-12 22:54:20 -05:00

35 lines
737 B
PHP

<?php
namespace Modules\Shipping\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreateShippingRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'method_name' => 'required|max:255|unique:shipping_methods,method_name',
'carrier_id' => 'nullable',
'cost_based_on' => 'required',
'cost' => 'required',
'shipment_time' => 'required',
];
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
}