-
-
Notifications
You must be signed in to change notification settings - Fork 1
Console
StefansArya edited this page Apr 17, 2019
·
5 revisions
The user defined command are editable on /routes/console.php
Console::command(pattern, callback, info='');
Console::command('echo {*}', function($message){
echo($message);
});
Console::hiddenInput();
Console::command('input', function(){
echo("Type something invisible: ");
print_r("Result: ".Console::hiddenInput());
}, 'Type something');
Console::chalk(text, color);
Console::command('echo {*}', function($message){
echo(Console::chalk("Computer> $message", 'yellow'));
});
Console::args(pattern, callback);
Console::command('echo {*}', function($all){
Console::args('{0} {1}', function($name, $message){
echo("$name> $message");
});
// Check if args above was not being called
if(!Console::$found)
echo "Computer> $all";
});
Console::help(text, color);
Console::help('echo', "Type 'echo (anything here)' to get echo back.");
Console::clear();
Console::isConsole() === true;
Console::collection();
Console::table(array);