From b88cd706c03fe369f29891830916adb971e14ea9 Mon Sep 17 00:00:00 2001 From: Watheq Alshowaiter Date: Mon, 15 Jul 2024 11:10:47 +0300 Subject: [PATCH] docs: improve complex to be correct in Laravel 9, which has ulid() default name is uuid --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index df14a9e..f2f397b 100644 --- a/README.md +++ b/README.md @@ -62,10 +62,10 @@ Schema::create('posts', function (Blueprint $table) { $table->foreignId('user_id')->constrained(); // required $table->foreignId('category')->nullable(); // nullable $table->uuid(); // required (but will be changed later) 👇 - $table->ulid()->nullable(); // nullable (but will be changed later) 👇 + $table->ulid('ulid')->nullable(); // nullable (but will be changed later) 👇 $table->boolean('active')->default(false); // default $table->string('title'); // required - $table->json('description')->nullable(); // nullable (but will be changed later) 👇 + $table->json('description'); // nullable (but will be changed later) 👇 $table->string('slug')->nullable()->unique(); // nullable $table->timestamps(); // nullable $table->softDeletes(); // nullable @@ -73,8 +73,8 @@ Schema::create('posts', function (Blueprint $table) { // later migration.. Schema::table('posts', function(Blueprint $table){ - $table->json('description')->change(); // required - $table->ulid()->nullable(false)->change(); // required + $table->json('description')->nullable(false)->change(); // required + $table->ulid('ulid')->nullable(false)->change(); // required $table->uuid()->nullable()->change(); // nullable }); ```