我正在使用Laravel 4中的[照亮/数据库组件] [1]到作曲家 - 虽然它一般 运行良好,数据库外观似乎在这个独立版本中被打破。 这意味着我无法使用DB :: raw()等静态函数。 看起来数据库外观甚至包含在包中,但它不适用于:: raw()。 p>
我正在尝试这样做 - p>
...-> orderBy(DB :: raw('RAND ()'))
code> pre>
div>
I'm using the [illuminate/database component][1] from Laravel 4 through composer - and while it generally works well, the DB facade seems to be broken in this standalone version. This meant I was unable to use static functions such as DB::raw(). It seems like the DB facade is even included in the package, but it doesn't work with ::raw().
I'm trying to do something like this -
...->orderBy(DB::raw('RAND()'))
我正在使用Laravel 4中的[照亮/数据库组件] [1]到作曲家 - 虽然它一般 运行良好,数据库外观似乎在这个独立版本中被打破。 这意味着我无法使用DB :: raw()等静态函数。 看起来数据库外观甚至包含在包中,但它不适用于:: raw()。 p>
我正在尝试这样做 - p>
...-> orderBy(DB :: raw('RAND ()'))
code> pre>
div>