Skip to content

Commit afd2a3a

Browse files
authored
Merge pull request #4 from mpstenson/fix-1-register-package-config
fix issue #3 where config file would not publish
2 parents bd2a1a8 + 2630036 commit afd2a3a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/AdvStr.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class AdvStr
2121
*/
2222
public static function advPassword($length = 32, $letters = true, $numbers = true, $symbols = true, $spaces = false, $upperLetters = false, $lowerLetters = false, $exclude = [])
2323
{
24-
$password = new Collection();
24+
$password = new Collection;
2525

2626
// $letters enables both upper case and lower case letters to create a mixed case password
2727
if ($letters === true) {

src/AdvStrServiceProvider.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function boot()
1515
Str::macro($methodName, function () use ($methodName) {
1616
$args = func_get_args();
1717

18-
return (new AdvStr())->$methodName(...$args);
18+
return (new AdvStr)->$methodName(...$args);
1919
});
2020
}
2121
}
@@ -30,6 +30,13 @@ public function configurePackage(Package $package): void
3030
*/
3131
$package
3232
->name('laravel-advanced-string')
33-
->hasConfigFile();
33+
->hasConfigFile('advanced-string');
34+
}
35+
36+
public function registeringPackage()
37+
{
38+
$this->publishes([
39+
__DIR__.'/../config/advanced-string.php' => config_path('advanced-string.php'),
40+
], 'laravel-advanced-string-config');
3441
}
3542
}

0 commit comments

Comments
 (0)