mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-24 12:05:39 +08:00
40 lines
811 B
PHP
40 lines
811 B
PHP
<?php
|
|
/**
|
|
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
|
|
* @license https://opensource.org/licenses/GPL-2.0
|
|
* @link https://www.koogua.com
|
|
*/
|
|
|
|
namespace App\Services\Logic\Vip;
|
|
|
|
use App\Repos\Vip as VipRepo;
|
|
use App\Services\Logic\Service as LogicService;
|
|
|
|
class OptionList extends LogicService
|
|
{
|
|
|
|
public function handle()
|
|
{
|
|
$vipRepo = new VipRepo();
|
|
|
|
$vips = $vipRepo->findAll(['deleted' => 0]);
|
|
|
|
if ($vips->count() == 0) {
|
|
return [];
|
|
}
|
|
|
|
$result = [];
|
|
|
|
foreach ($vips as $vip) {
|
|
$result[] = [
|
|
'id' => $vip->id,
|
|
'title' => $vip->title,
|
|
'expiry' => $vip->expiry,
|
|
'price' => $vip->price,
|
|
];
|
|
}
|
|
|
|
return $result;
|
|
}
|
|
|
|
} |