The first save() of a bare Product failed with Unknown column 'updated_at': Eloquent writes both timestamps unless told otherwise, and each bookshop table has its own habit. Product got #[WithoutTimestamps]; Customer, with created_at only, got const UPDATED_AT = null;; Order got const CREATED_AT = 'ordered_at'; and UPDATED_AT = null. The new coupons table has $table->uuid('id')->primary(), and its model use HasUuids;:
use App\Models\{Coupon, Customer, Order};
Coupon::create(['code' => 'AUTUMN10', 'percent_off' => 10, 'expires_at' => '2026-10-31']);
Customer::create(['email' => 'ivy@example.com', 'name' => 'Ivy Chen', 'country' => 'SG']);
Order::create(['customer_id' => 9, 'status' => 'pending']);-- insert into `coupons` (`code`, `percent_off`, `expires_at`, `id`, `updated_at`,
`created_at`) values ('AUTUMN10', 10, '2026-10-31 00:00:00',
'01a0cd58-a818-72de-9022-47c79e122048', '2026-09-23 08:18:54', '2026-09-23 08:18:54')
-- insert into `customers` (`email`, `name`, `country`, `created_at`) values
('ivy@example.com', 'Ivy Chen', 'SG', '2026-09-23 08:18:54')
-- insert into `orders` (`customer_id`, `status`, `ordered_at`) values (9, 'pending',
'2026-09-23 08:18:54')HasUuids filled the key in PHP. The 7 opening its third group marks a UUIDv7, the default, whose leading 48 bits are a millisecond timestamp, so new keys append to the InnoDB clustered index instead of splitting random pages (Clustered Indexes). HasVersion4Uuids gives random v4 keys, and HasUlids sortable 26-character ULIDs. Times use the app timezone, UTC by default.