Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
b60516f5
Commit
b60516f5
authored
Nov 28, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if there is input given
parent
007e5ced
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
8 deletions
+31
-8
InstallCommand.php
Modules/Core/Console/InstallCommand.php
+31
-8
No files found.
Modules/Core/Console/InstallCommand.php
View file @
b60516f5
...
...
@@ -132,10 +132,25 @@ class InstallCommand extends Command
{
$this
->
line
(
'Creating an Admin user account...'
);
$firstname
=
$this
->
ask
(
'Enter your first name'
);
$lastname
=
$this
->
ask
(
'Enter your last name'
);
$email
=
$this
->
ask
(
'Enter your email address'
);
$password
=
$this
->
secret
(
'Enter a password'
);
do
{
$firstname
=
$this
->
ask
(
'Enter your first name'
);
if
(
$firstname
==
''
)
$this
->
error
(
'First name is required'
);
}
while
(
!
$firstname
);
do
{
$lastname
=
$this
->
ask
(
'Enter your last name'
);
if
(
$lastname
==
''
)
$this
->
error
(
'Last name is required'
);
}
while
(
!
$lastname
);
do
{
$email
=
$this
->
ask
(
'Enter your email address'
);
if
(
$email
==
''
)
$this
->
error
(
'Email is required'
);
}
while
(
!
$email
);
do
{
$password
=
$this
->
secret
(
'Enter a password'
);
if
(
$password
==
''
)
$this
->
error
(
'Password is required'
);
}
while
(
!
$password
);
$userInfo
=
[
'first_name'
=>
$firstname
,
...
...
@@ -204,10 +219,18 @@ class InstallCommand extends Command
*/
private
function
configureDatabase
()
{
// Ask for credentials
$databaseName
=
$this
->
ask
(
'Enter your database name'
);
$databaseUsername
=
$this
->
ask
(
'Enter your database username'
);
$databasePassword
=
$this
->
secret
(
'Enter your database password'
);
do
{
$databaseName
=
$this
->
ask
(
'Enter your database name'
);
if
(
$databaseName
==
''
)
$this
->
error
(
'Database name is required'
);
}
while
(
!
$databaseName
);
do
{
$databaseUsername
=
$this
->
ask
(
'Enter your database username'
);
if
(
$databaseUsername
==
''
)
$this
->
error
(
'Database username is required'
);
}
while
(
!
$databaseUsername
);
do
{
$databasePassword
=
$this
->
secret
(
'Enter your database password'
);
if
(
$databasePassword
==
''
)
$this
->
error
(
'Database password is required'
);
}
while
(
!
$databasePassword
);
$this
->
setLaravelConfiguration
(
$databaseName
,
$databaseUsername
,
$databasePassword
);
$this
->
configureEnvironmentFile
(
$databaseName
,
$databaseUsername
,
$databasePassword
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment