From 06027ea23f1541277a6cc36b28967a634560e919 Mon Sep 17 00:00:00 2001 From: Ollie Read Date: Sat, 22 Feb 2014 10:59:12 +0000 Subject: [PATCH] Added the multiauth:clear-reminders command --- .../Console/ClearRemindersCommand.php | 33 +++++++++++++++++++ .../Reminders/ReminderServiceProvider.php | 7 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/Ollieread/Multiauth/Console/ClearRemindersCommand.php diff --git a/src/Ollieread/Multiauth/Console/ClearRemindersCommand.php b/src/Ollieread/Multiauth/Console/ClearRemindersCommand.php new file mode 100644 index 0000000..715ec29 --- /dev/null +++ b/src/Ollieread/Multiauth/Console/ClearRemindersCommand.php @@ -0,0 +1,33 @@ +laravel['auth.reminder.repository']->deleteExpired(); + + $this->info('Expired reminders cleared!'); + } + +} \ No newline at end of file diff --git a/src/Ollieread/Multiauth/Reminders/ReminderServiceProvider.php b/src/Ollieread/Multiauth/Reminders/ReminderServiceProvider.php index d4d9f34..f94f779 100644 --- a/src/Ollieread/Multiauth/Reminders/ReminderServiceProvider.php +++ b/src/Ollieread/Multiauth/Reminders/ReminderServiceProvider.php @@ -96,8 +96,13 @@ protected function registerCommands() return new RemindersTableCommand($app['files']); }); + $this->app->bindShared('command.multiauth.reminders.clear', function($app) + { + return new ClearRemindersCommand; + }); + $this->commands( - 'command.multiauth.reminders' + 'command.multiauth.reminders', 'comment.multiauth.clear' ); }