// +---------------------------------------------------------------------- namespace App\Services\Common; use App\Models\AdvertModel; use App\Services\BaseService; /** * 用户挂单广告-服务类 * Class AdvertService * @package App\Services\Common */ class AdvertService extends BaseService { // 静态对象 protected static $instance = null; /** * 构造函数 * @since 2020/11/10 * AdvertService constructor. */ public function __construct() { $this->model = new AdvertModel(); } /** * 静态入口 * @return static|null */ public static function make() { if (!self::$instance) { self::$instance = (new static()); } return self::$instance; } }