You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
namespace App\Controller;
use Hyperf\Di\Annotation\Inject;use App\Constants\ErrorCode;use App\Exception\BusinessException;
class DeviceController extends BaseController{ public function bind() { $validator = $this->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() { }}
|