From 93c2eb190fc14d1c1ba016dc74418b4652e8d85a Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Sat, 5 Dec 2020 11:03:12 +0200 Subject: [PATCH] Added a help command in the console --- application/controllers/Console.php | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/application/controllers/Console.php b/application/controllers/Console.php index a21851db..dfae98f2 100644 --- a/application/controllers/Console.php +++ b/application/controllers/Console.php @@ -219,4 +219,39 @@ class Console extends EA_Controller { Google::sync($provider['id']); } } + + + /** + * Show help information about the console capabilities. + * + * Use this method to see the available commands. + * + * Usage: + * + * php index.php console help + */ + public function help() + { + $help = [ + '', + 'Easy!Appointments ' . config('version'), + '', + 'Usage:', + '', + '⇾ php index.php console [command] [arguments]', + '', + 'Commands:', + '', + '⇾ php index.php console migrate', + '⇾ php index.php console migrate fresh', + '⇾ php index.php console seed', + '⇾ php index.php console install', + '⇾ php index.php console backup', + '⇾ php index.php console sync', + '', + '', + ]; + + $this->output->set_output(implode(PHP_EOL, $help)); + } }