阅读背景:

如何在Laravel中使用Eloquent对NULL值进行排序

来源:互联网 

I've got a many to many relationship between my employees and groups table. I've created the pivot table, and all is working correctly with that. However, I've got a sortOrder column on my employees table that I use to determine the order in which they display. Employee with a value of 1 in the sortOrder column should be first, value of 2 should be second, so on. (Or backwards if sorted descending) The sortOrder column is a integer column that allows null values.I've got a many to many relationship between my




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: