1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-14 01:44:03 +00:00
tenancy/src/Database/Concerns/MaintenanceMode.php
2020-05-22 09:01:31 +00:00

20 lines
467 B
PHP

<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Database\Concerns;
use Carbon\Carbon;
trait MaintenanceMode
{
public function putDownForMaintenance($data = [])
{
$this->update(['maintenance_mode' => [
'time' => $data['time'] ?? Carbon::now()->getTimestamp(),
'message' => $data['message'] ?? null,
'retry' => $data['retry'] ?? null,
'allowed' => $data['allowed'] ?? [],
]]);
}
}