I think you want to use www.example.com/rsmobile/user?userid=1
pattern only and not www.example.com/rsmobile/user/1
.
In AbstractRestfulController
, $identifierName
is set to id
, by default. If it does not find id
in list of params then it will call getList()
method. So what you can do is in your controller(which must be extending AbstractRestfulController
) write below code :
public function __construct() {
$this->identifierName = 'userId'; // Override $identifierName value specified in AbstractRestfulController.
}