laravel-mongodb icon indicating copy to clipboard operation
laravel-mongodb copied to clipboard

schema default value not working

Open webafra opened this issue 3 years ago • 0 comments

  • Laravel-mongodb Version: 9
  • PHP Version: 8
  • Database Driver & Version: latest

Description:

Schema::create('my_doc', function (Blueprint $collection) {
            $collection->id();
            $collection->string('title')->default('test');
            $collection->timestamps();
        });

When a record is stored without a title value, the title field value is empty.

webafra avatar Jun 08 '22 11:06 webafra