mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 01:44:03 +00:00
20 lines
467 B
PHP
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'] ?? [],
|
|
]]);
|
|
}
|
|
}
|