Compare commits
2 Commits
0ca5a445f5
...
7e1f1184fe
Author | SHA1 | Date |
---|---|---|
b1ek | 7e1f1184fe | |
b1ek | 7cee091b6d |
|
@ -10,7 +10,7 @@ class HistoryObserver
|
|||
History::create([
|
||||
'model_id' => $model->id,
|
||||
'model_name' => $model->getTable(),
|
||||
'before' => null,
|
||||
'before' => [],
|
||||
'after' => $model->toArray(),
|
||||
'action' => HistoryAction::Insert,
|
||||
]);
|
||||
|
@ -33,7 +33,7 @@ class HistoryObserver
|
|||
'model_id' => $model->id,
|
||||
'model_name' => $model->getTable(),
|
||||
'before' => $model->getRawOriginal(),
|
||||
'after' => null,
|
||||
'after' => [],
|
||||
'action' => HistoryAction::Delete,
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -16,8 +16,11 @@ class DatabaseSeeder extends Seeder
|
|||
// User::factory(10)->create();
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
'last_name' => fake()->lastName,
|
||||
'name' => fake()->name,
|
||||
'middle_name' => fake()->name(),
|
||||
'phone' => fake()->unique()->phoneNumber,
|
||||
'email' => fake()->unique()->safeEmail,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue