123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace App\Http\Controllers\Manage\Channel;
- use App\Http\Controllers\Controller;
- use App\Modules\Channel\Services\ChannelService;
- use App\Modules\Trade\Services\OrderService;
- use Illuminate\Http\Request;
- class ChannelDataController extends Controller
- {
- function getChannleData(Request $request)
- {
-
- $channels = ChannelService::getAllChannels();
- if (!empty($channels)) {
-
- foreach ($channels as $channelItem) {
- $channelId = $channelItem->id;
- $channelItem->dataInfo = OrderService::getChannelToday($channelId);
- }
- }
- return json_encode($channels);
- }
- }
|