diff --git a/src/Http/Controllers/TagController.php b/src/Http/Controllers/TagController.php index f23ff9d..bf3f5e7 100644 --- a/src/Http/Controllers/TagController.php +++ b/src/Http/Controllers/TagController.php @@ -22,7 +22,8 @@ public function store(Request $request) 'text_color' => [ 'required', 'regex:^#(?:[0-9a-fA-F]{3}){1,2}$^' - ] + ], + 'order' => 'required' ]); $tag = new Tag($request->all()); diff --git a/src/database/migrations/2017_15_04_182100_alter_calendar_tags_for_order.php b/src/database/migrations/2017_15_04_182100_alter_calendar_tags_for_order.php index 2b74069..1b61158 100644 --- a/src/database/migrations/2017_15_04_182100_alter_calendar_tags_for_order.php +++ b/src/database/migrations/2017_15_04_182100_alter_calendar_tags_for_order.php @@ -15,7 +15,7 @@ class AlterCalendarTagsForOrder extends Migration public function up() { Schema::table('calendar_tags', function (Blueprint $table) { - $table->string('order'); + $table->string('order')->nullable()->default('0'); }); }