SQLSTATE[HY000]: General error: 1005 Can't create table `test`.`posts` (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table `posts` add constraint `posts_category_id_foreign` foreign key (`category_id`) references `category` (`id`) on delete cascade)
$table->foreignId('category_id')->constrained('category')->onDelete('cascade');