更新
This commit is contained in:
@@ -29,8 +29,17 @@ class RosterController extends BaseAdminController
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$params = (new RosterValidate())->post()->goCheck('save');
|
||||
$post = request()->post();
|
||||
$defaults = [];
|
||||
if (empty($post['period'])) {
|
||||
$defaults['period'] = 'segment';
|
||||
}
|
||||
$params = (new RosterValidate())->post()->goCheck('save', $defaults);
|
||||
$result = RosterLogic::save($params);
|
||||
if ($result === false) {
|
||||
return $this->fail(RosterLogic::getError());
|
||||
}
|
||||
|
||||
return $this->success('保存成功', $result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user