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.
|
- <?php
-
- namespace App\Logic\ReceiptIssuingOrder;
-
- use App\Models\ReceiptIssuingOrder;
- use App\Util\DateUtil;
-
- class TokenCheckManager extends ReceiptIssuingOrderManager
- {
-
- public function __construct(
- protected ReceiptIssuingOrder $order,
- ) {
- parent::__construct($order);
- }
-
- public function check(string $token): bool
- {
- $ret = $this->checkToken($token);
-
- if (
- $ret &&
- $this->order->status_first_access_datetime === null
- ) {
- $this->order->status_first_access_datetime = DateUtil::now();
- $this->save();
- }
-
- return $ret;
- }
- }
|