feat: ✨ Update last_billed to current time on unsuspend server
This commit is contained in:
parent
a26f6dd137
commit
cad41ffb0a
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Classes\Pterodactyl;
|
use App\Classes\Pterodactyl;
|
||||||
|
use Carbon\Carbon;
|
||||||
use Exception;
|
use Exception;
|
||||||
use GuzzleHttp\Promise\PromiseInterface;
|
use GuzzleHttp\Promise\PromiseInterface;
|
||||||
use Hidehalo\Nanoid\Client;
|
use Hidehalo\Nanoid\Client;
|
||||||
|
@ -124,10 +125,12 @@ class Server extends Model
|
||||||
|
|
||||||
if ($response->successful()) {
|
if ($response->successful()) {
|
||||||
$this->update([
|
$this->update([
|
||||||
'suspended' => null
|
'suspended' => null,
|
||||||
|
'last_billed' => Carbon::now()->toDateTimeString(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue