芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/app/Http/Requests/RoleRequest.php
[ 'required', 'string', Rule::unique('roles')->where('scope', $this->header('company')), ], 'abilities' => [ 'required', ], 'abilities.*' => [ 'required', ], ]; if ($this->getMethod() == 'PUT') { $rules['name'] = [ 'required', 'string', Rule::unique('roles') ->ignore($this->route('role')->id, 'id') ->where('scope', $this->header('company')), ]; } return $rules; } public function getRolePayload() { return collect($this->except('abilities')) ->merge([ 'scope' => $this->header('company'), ]) ->toArray(); } }