diff --git a/README.md b/README.md index b49bbe8..4fb1d20 100644 --- a/README.md +++ b/README.md @@ -404,7 +404,7 @@ Always keep in mind that, if we use package methods via Facade, we are using it * * @return $this */ -public function new(); +public function reset(); ``` **Example:** @@ -413,8 +413,8 @@ public function new(); // Genrate one select box, exclude two groups of timezones, Asia and Africa $selectBox = Timezonelist::excludeGroups(['Asia', 'Africa'])->toSelectBox('timezone'); -$list1 = Timezonelist::toArray(); // Two groups, Asia and Africa, will not be loaded into the result -$list2 = Timezonelist::new()->toArray() // All groups will be loaded +$list1 = Timezonelist::toArray(); // Two groups, Asia and Africa, will not be loaded into the result +$list2 = Timezonelist::reset()->toArray() // All groups will be loaded ``` # Contributors diff --git a/src/Facades/Timezonelist.php b/src/Facades/Timezonelist.php index 0b38762..f0114dc 100644 --- a/src/Facades/Timezonelist.php +++ b/src/Facades/Timezonelist.php @@ -11,7 +11,7 @@ * @method static \Jackiedo\Timezonelist\Timezonelist excludeGroups(array $groups=[]) Set the filter of the groups do not want to get. * @method static \Jackiedo\Timezonelist\Timezonelist splitGroup(bool $status=true) Decide whether to split group or not. * @method statis \Jackiedo\Timezonelist\Timezonelist showOffset(bool $status=true) Decide whether to show the offset or not. - * @method static \Jackiedo\Timezonelist\Timezonelist new() Return new static to reset all config. + * @method static \Jackiedo\Timezonelist\Timezonelist reset() Return new static to reset all config. * @method static string toSelectBox(string $name, null|string $selected=null, null|array|string $attrs=null, bool $htmlencode=true) Create a select box of timezones. * @method static string create(string $name, null|string $selected=null, null|array|string $attrs=null, bool $htmlencode=true) Alias of the `toSelectBox()` method. * @method static array toArray(bool $htmlencode=true) Create an array of timezones. diff --git a/src/Timezonelist.php b/src/Timezonelist.php index 8995096..f1c4821 100644 --- a/src/Timezonelist.php +++ b/src/Timezonelist.php @@ -148,7 +148,7 @@ public function showOffset($status = true) * * @return $this */ - public function new() + public function reset() { return new static; }