You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
476 B
20 lines
476 B
<?php
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Slide;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
//轮播图
|
|
class SlideController extends Controller
|
|
{
|
|
//轮播图列表
|
|
public function index()
|
|
{
|
|
$list = Slide::where(['agent_id' => $this->agent_id, 'status' => 1])
|
|
->orderBy(DB::raw('sort ASC, id DESC'))
|
|
->limit(10)
|
|
->get(['title','picture', 'type', 'url']);
|
|
return $this->success($list);
|
|
}
|
|
}
|