diff --git a/README.md b/README.md index 511df04a..f58eed1b 100644 --- a/README.md +++ b/README.md @@ -831,6 +831,13 @@ The `characterLimit` method has been renamed to `maxLength`. +Textarea::make('Description')->maxLength(100) ``` +The `weekStartsOn` method has been renamed to `firstDayOfWeek`. + +```diff +-DatePicker::make('Date')->weekStartsOn(1) ++DatePicker::make('Date')->firstDayOfWeek(1) +``` + The `CharacterLimit` trait has been renamed to `MaxLength`. ```diff diff --git a/src/Fields/Settings/WeekDay.php b/src/Fields/Settings/WeekDay.php index 66b6585d..b9d3a864 100644 --- a/src/Fields/Settings/WeekDay.php +++ b/src/Fields/Settings/WeekDay.php @@ -15,7 +15,7 @@ trait WeekDay { - public function weekStartsOn(int $day): static + public function firstDayOfWeek(int $day): static { $this->settings['first_day'] = $day; diff --git a/tests/Fields/DatePickerTest.php b/tests/Fields/DatePickerTest.php index f623df47..c0e9f986 100644 --- a/tests/Fields/DatePickerTest.php +++ b/tests/Fields/DatePickerTest.php @@ -36,9 +36,9 @@ public function testReturnFormat() $this->assertSame('d/m/Y', $field['return_format']); } - public function testWeekStartsOnn() + public function testFirstDayOfWeek() { - $field = DatePicker::make('Date Week Day')->weekStartsOn(1)->get(); + $field = DatePicker::make('Date Week Day')->firstDayOfWeek(1)->get(); $this->assertSame(1, $field['first_day']); } }