How to add default value to enum type field in schema builder

QuestionsCategory: LaravelHow to add default value to enum type field in schema builder
VR Soft Coder Staff asked 6 months ago

1 Answers
VR Soft Coder Staff answered 6 months ago

You need to add like below in your migration file:-

$table->enum('status', array('active','de-active'))->default('active');

Your Answer

Related Posts

Begin typing your search above and press enter to search. Press ESC to cancel.

Back To Top