Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Yeray Santana Hualde
syncEnrollments
Commits
29b668b8
Commit
29b668b8
authored
Jul 11, 2012
by
Shawn McCool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added help:commands task to artisan
parent
1503aed7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
125 additions
and
0 deletions
+125
-0
dependencies.php
laravel/cli/dependencies.php
+12
-0
help.json
laravel/cli/tasks/help.json
+78
-0
help.php
laravel/cli/tasks/help.php
+35
-0
No files found.
laravel/cli/dependencies.php
View file @
29b668b8
...
@@ -125,4 +125,16 @@ if(! IoC::registered('bundle.provider: github'))
...
@@ -125,4 +125,16 @@ if(! IoC::registered('bundle.provider: github'))
{
{
return
new
Tasks\Bundle\Providers\Github
;
return
new
Tasks\Bundle\Providers\Github
;
});
});
}
/**
* The "help" task provides information about
* artisan usage.
*/
if
(
!
IoC
::
registered
(
'task: help'
))
{
IoC
::
singleton
(
'task: help'
,
function
()
{
return
new
Tasks\Help
;
});
}
}
\ No newline at end of file
laravel/cli/tasks/help.json
0 → 100644
View file @
29b668b8
{
"Application Configuration"
:
{
"key:generate"
:
{
"description"
:
"Generate a secure application key."
,
"command"
:
"php artisan key:generate"
}
},
"Database Tables"
:
{
"session:table"
:
{
"description"
:
"Generate a migration for the sessions database table."
,
"command"
:
"php artisan session:table"
}
},
"Migrations"
:
{
"migrate:install"
:
{
"description"
:
"Create the Laravel migration table."
,
"command"
:
"php artisan migrate:install"
},
"migrate:make"
:
{
"description"
:
"Create a migration."
,
"command"
:
"php artisan migrate:make create_users_table"
},
"migrate"
:
{
"description"
:
"Run outstanding migrations."
,
"command"
:
"php artisan migrate"
},
"migrate:rollback"
:
{
"description"
:
"Roll back the most recent migration."
,
"command"
:
"php artisan migrate:rollback"
},
"migrate:reset"
:
{
"description"
:
"Roll back all migrations."
,
"command"
:
"php artisan migrate:reset"
}
},
"Bundles"
:
{
"bundle:install"
:
{
"description"
:
"Install a bundle."
,
"command"
:
"php artisan bundle:install swiftmailer"
},
"bundle:upgrade"
:
{
"description"
:
"Upgrade a bundle."
,
"command"
:
"php artisan bundle:upgrade swiftmailer"
},
"bundle:publish"
:
{
"description"
:
"Publish all bundles' assets."
,
"command"
:
"php artisan bundle:publish"
}
},
"Unit Tests"
:
{
"test"
:
{
"description"
:
"Run the application's tests."
,
"command"
:
"php artisan test"
}
},
"Routing"
:
{
"route:call"
:
{
"description"
:
"Call a route."
,
"command"
:
"php artisan route:call get api/user/1"
}
},
"Application Keys"
:
{
"key:generate"
:
{
"description"
:
"Generate an application key."
,
"command"
:
"php artisan key:generade"
}
},
"CLI Options"
:
{
"--env="
:
{
"description"
:
"Set the Laravel environment."
,
"command"
:
"php artisan task --env=local"
},
"--database="
:
{
"description"
:
"Set the default database connection."
,
"command"
:
"php artisan task --database=mysql"
}
}
}
\ No newline at end of file
laravel/cli/tasks/help.php
0 → 100644
View file @
29b668b8
<?php
namespace
Laravel\CLI\Tasks
;
use
Laravel\Str
;
use
Laravel\File
;
class
Help
extends
Task
{
/**
* List
*
* @param array $arguments
* @return void
*/
public
function
commands
()
{
$command_data
=
json_decode
(
file_get_contents
(
__DIR__
.
'/help.json'
));
$i
=
0
;
foreach
(
$command_data
as
$category
=>
$commands
)
{
if
(
$i
++
!=
0
)
echo
PHP_EOL
;
echo
PHP_EOL
.
"#
$category
"
.
PHP_EOL
;
foreach
(
$commands
as
$command
=>
$details
)
{
echo
PHP_EOL
.
str_pad
(
$command
,
20
)
.
str_pad
(
$details
->
description
,
30
);
}
}
}
}
\ No newline at end of file
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