php artisan list
php artisan
help
migrate
Tinker 让你可以在命令行中与 Laravel 应用进行交互
php artisan tinker
在routes/console.php里面可以加闭包命令
Artisan::
command
(
'build {project}'
,
function
(
$project
) {
$this
->
info
(
"Building
{
$project
}
!"
)
;
})->
describe
(
'Build the project, yeah'
)
;
php artisan build elesos
参数及选项都包在大括号中
不接收值的选项,当在命令中写出时,值为true,不写表示false
注册
app/Console/Kernel.php
protected
$commands
=
[
Commands
\
SendEmails
::
class
];
Route
::
get
(
'/foo'
,
function
()
{
$exitCode
=
Artisan
::
call
(
'email:send'
,
[
'user'
=>
1
,
'--queue'
=>
'default'
]);
//
});
还可以
命令中调用其它命令