Commit c72a6662 by LiuJunYi

调整轮播图顺序(最新)

parent d8bce5f0
......@@ -19,7 +19,9 @@ class Banner extends Base
*/
public function index()
{
$banner = BannerModel::all(['status' => 1]);
$banner = BannerModel::where('status', 1)
->order('id', 'desc')
->select();
if (!$banner) return ['code' => 1, 'msg' => '没有更多'];
return ['code' => 0, 'msg' => 'success', 'data' => $banner];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment