|
@@ -0,0 +1,41 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace General\Requests;
|
|
|
+
|
|
|
+use Illuminate\Http\Request as BaseRequest;
|
|
|
+
|
|
|
+class CompanyAuthRequest extends Request
|
|
|
+{
|
|
|
+ public function __construct(BaseRequest $request)
|
|
|
+ {
|
|
|
+ $this->query = $request->query;
|
|
|
+ $this->request = $request->request;
|
|
|
+ $this->attributes = $request->attributes;
|
|
|
+ $this->cookies = $request->cookies;
|
|
|
+ $this->files = $request->files;
|
|
|
+ $this->server = $request->server;
|
|
|
+ $this->content = $request->content;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the validation rules that apply to the request.
|
|
|
+ *
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function rules()
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ 'app_id' => 'required|string|exists:company_auth_configs',
|
|
|
+ 'nonce_str' => 'required|string',
|
|
|
+ 'timestamp' => 'required|string',
|
|
|
+ 'sign' => 'required|string',
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
+ public function messages()
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ 'app_id.exists' => '未授权!',
|
|
|
+ ];
|
|
|
+ }
|
|
|
+}
|