|
|
@ -15,7 +15,11 @@ class ChannelController extends Controller |
|
|
// 所有频道列表
|
|
|
// 所有频道列表
|
|
|
public function index() |
|
|
public function index() |
|
|
{ |
|
|
{ |
|
|
$list = Channel::orderBy('sort')->orderBy('id', 'DESC')->get(['id', 'pid', 'name', 'icon']); |
|
|
|
|
|
|
|
|
$list = Channel::query() |
|
|
|
|
|
->where('agent_id', $this->agent_id) |
|
|
|
|
|
->orderBy('sort') |
|
|
|
|
|
->orderBy('id') |
|
|
|
|
|
->get(['id', 'pid', 'name', 'icon']); |
|
|
return $this->success($list); |
|
|
return $this->success($list); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|