You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
394 B
PHTML

5 years ago
<?php
namespace Base\Service;
use Base\Facade\Request;
class AgentService {
public function addRecord($params)
{
$data = M('agent', 'tab_')->create($params);
if(!$data){
return $this->getError();
}
$status = M('agent', 'tab_')->add($data);
if ($status) {
$id = M()->getLastInsID();
return $id;
} else {
return 0;
}
}
}