This commit is contained in:
iVampireSP.com 2022-09-15 12:32:15 +08:00
parent 997fbefa20
commit 353790dd3b
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -16,7 +16,10 @@ public function up()
Schema::connection('mongodb')->create('transactions', function (Blueprint $collection) {
$collection->unsignedBigInteger('user_id')->index();
$collection->expire('created_at', now()->addYear());
// a year
$year = 365 * 24 * 60 * 60;
$collection->expire('created_at', $year);
});