PHP报错:php
strpos() expects parameter 1 to be string, integer given
出错代码数组
public static function showArticle($id) { ArticleModel::where('id', '=', $id) ->update(['is_show', 0]); }
问题在于数组的格式写错了ide
->update(['is_show', 0]);
应该修改成spa
public static function showArticle($id) { ArticleModel::where('id', '=', $id) ->update(['is_show'=> 0]); }
参考
【踩坑系列】strpos() expects parameter 1 to be string, int givencode