1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 14:34:04 +00:00

Fix readied column cast

This commit is contained in:
j.stein 2022-01-18 18:18:39 +01:00
parent 30f0a2b134
commit 76a8d639ae
2 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ use Stancl\Tenancy\Events\ReadyingTenant;
use Stancl\Tenancy\Events\TenantReadied;
/**
* @property null|Carbon $readied
* @property $readied
*
* @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder withReadied(bool $withReadied = true)
* @method static static|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder onlyReadied()
@ -36,7 +36,7 @@ trait WithReadied
*/
public function initializeWithReadied()
{
$this->casts['readied'] = 'datetime';
$this->casts['readied'] = 'timestamp';
}

View file

@ -56,10 +56,10 @@ class ReadiedTenantsTest extends TestCase
Artisan::call(CreateReadiedTenants::class);
config(['tenancy.readied.older_than_days' => 4]);
config(['tenancy.readied.older_than_days' => 2]);
tenancy()->model()->query()->onlyReadied()->first()->update([
'readied' => now()->subDays()
'readied' => now()->subDays(5)->timestamp
]);
Artisan::call(ClearReadiedTenants::class);