We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
重要提醒 PHP版本不能使用7.4 .env文件中添加DB_SOCKET=/tmp/mysql.sock(根据自己的环境修改路径)
DB_SOCKET=/tmp/mysql.sock
代码存在缺陷 laracms/src/Models/Traits/WithOrderHelper.php
/** * 追加排序条件 * * @param $query * @param $sortField * @param $sortOrder * @return mixed */ public function scopeWithOrder($query, $sortField, $sortOrder) { $sortField = empty($sortField) ? 'updated_at' : $sortField; $sortOrder = in_array($sortOrder, ['asc','desc']) ? 'desc' : $sortOrder; return $query->orderBy($sortField, $sortOrder); }
改为
/** * 追加排序条件 * * @param $query * @param $sortField * @param $sortOrder * @return mixed */ public function scopeWithOrder($query, $sortField, $sortOrder) { $sortField = empty($sortField) ? 'updated_at' : $sortField; $sortOrder = empty($sortOrder) ? 'desc' : $sortOrder; return $query->orderBy($sortField, $sortOrder); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
重要提醒
PHP版本不能使用7.4
.env文件中添加
DB_SOCKET=/tmp/mysql.sock
(根据自己的环境修改路径)代码存在缺陷
laracms/src/Models/Traits/WithOrderHelper.php
改为
The text was updated successfully, but these errors were encountered: