mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:14:03 +00:00
Fix readied column cast
This commit is contained in:
parent
30f0a2b134
commit
76a8d639ae
2 changed files with 4 additions and 4 deletions
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue