src/Commands/Stubs/Backend/Master/Item/Requests/UpdateRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'code' => 'required|min:5|max:20|unique:__defaultNamespace__\Models\MItem,code,' . $this->id,
            'name' => 'required|min:5',
            'type' => 'required|in:inventory,non-inventory',
            'status' => 'required|in:ready,discontinued',
            'cogs' => 'nullable',
            'default_selling_price' => 'nullable',
            'minimum_stock_qty' => 'nullable',
            'note' => 'nullable',
        ];
    }
public function rules ( ) { return [ 'code' => 'required|min:5|max:20|unique:__defaultNamespace__\Models\MItem,code,' . $ this -> id , 'name' => 'required|min:5' , 'type' => 'required|in:inventory,non-inventory' , 'status' => 'required|in:ready,discontinued' , 'cogs' => 'nullable' , 'default_selling_price' => 'nullable' , 'minimum_stock_qty' => 'nullable' , 'note' => 'nullable' , ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .