File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use NiftyCo \Skeletor \Skeletor ;
4+
5+ return function (Skeletor $ skeletor ) {
6+ // Update the application name
7+ $ name = $ skeletor ->text ('Enter the application name: ' , 'Laravel ' );
8+
9+ if ($ name ) {
10+ $ skeletor ->pregReplaceInFile ('/^APP_NAME=(.*)$/m ' , 'APP_NAME= ' .$ name , '.env ' );
11+ }
12+
13+ // Update the demo user email
14+ $ email = $ skeletor ->text ('Enter the demo email: ' , 'admin@example.com ' );
15+
16+ if ($ email ) {
17+ $ skeletor ->pregReplaceInFile ('/^DEFAULT_USER_EMAIL=(".*?"|[^"\s]*|)$/m ' , 'DEFAULT_USER_EMAIL= ' .$ email , '.env ' );
18+ }
19+
20+ // Update the demo user password
21+ $ password = $ skeletor ->password ('Enter the demo password: ' , 'password ' );
22+
23+ if ($ password ) {
24+ $ skeletor ->pregReplaceInFile ('/^DEFAULT_USER_PASSWORD=(".*?"|[^"\s]*|)$/m ' , 'DEFAULT_USER_PASSWORD= ' .$ password , '.env ' );
25+ }
26+ };
You can’t perform that action at this time.
0 commit comments