更新
This commit is contained in:
parent
a25798316c
commit
78986e3900
@ -52,11 +52,8 @@ class Project extends Base
|
|||||||
*/
|
*/
|
||||||
public function publish(Request $request)
|
public function publish(Request $request)
|
||||||
{
|
{
|
||||||
$data = $request->post();
|
$res=Db::name('Projects')->where('id', $request->post('id'))->update(['state' => $request->post('state')]);
|
||||||
$find = ProjectModel::find($data['id']);
|
if ($res) {
|
||||||
$find['state'] = $data['state'];
|
|
||||||
$find->save();
|
|
||||||
if ($find) {
|
|
||||||
return $this->json(200, '操作成功');
|
return $this->json(200, '操作成功');
|
||||||
} else {
|
} else {
|
||||||
return $this->json(500, '操作失败');
|
return $this->json(500, '操作失败');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user