user()->checkPermission("accounting.account:create"); } /** * 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', 'sheet' => 'required|string', 'type' => 'required|string', 'category' => 'required|string', 'subcategory' => 'nullable|string', 'structure' => 'required|string', ]; } }