diff --git a/src/Traits/Timestampable.php b/src/Traits/Timestampable.php new file mode 100644 index 0000000..9167654 --- /dev/null +++ b/src/Traits/Timestampable.php @@ -0,0 +1,24 @@ +addHook(NomadicMigration::PRE_MIGRATE, function () use ($self) { + $self->set('started_at', Carbon::now()); + }); + $this->addHook(NomadicMigration::POST_MIGRATE, function () use ($self) { + $self->set('finished_at', Carbon::now()); + }); + } +}