Skip to content

Commit cc0d31e

Browse files
committed
add spaces
1 parent 44bdcea commit cc0d31e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Illuminate/Support/Str.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,9 +728,10 @@ public static function pluralStudly($value, $count = 2)
728728
* @param bool $letters
729729
* @param bool $numbers
730730
* @param bool $symbols
731+
* @param bool $spaces
731732
* @return string
732733
*/
733-
public static function password($length = 32, $letters = true, $numbers = true, $symbols = true)
734+
public static function password($length = 32, $letters = true, $numbers = true, $symbols = true, $spaces = true)
734735
{
735736
$characters = [];
736737

@@ -758,6 +759,10 @@ public static function password($length = 32, $letters = true, $numbers = true,
758759
]);
759760
}
760761

762+
if ($spaces) {
763+
$characters = array_merge($characters, [' ']);
764+
}
765+
761766
$password = '';
762767

763768
$possible = count($characters) - 1;

0 commit comments

Comments
 (0)