validationFactory->make( $request->all(), [ 'store_id' => 'required|nonempty|integer', ], [ 'store_id.required' => '参数不正确', 'store_id.nonempty' => '参数不正确', 'store_id.integer' => '参数不正确', ] ); if ($validator->fails()){ // Handle exception $errorMessage = $validator->errors()->first(); $this->result(200,[],$errorMessage); } } public function list() { } }