user()->checkPermission("accounting.account:update"); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'name' => 'required|string', 'code' => 'required|string|unique:accounts,code,'.$this->account->id, 'sheet' => 'required|string', 'type' => 'required|string', 'category' => 'required|string', 'subcategory' => 'nullable|string', 'structure' => 'required|string', ]; } }