Skip to content
This repository has been archived by the owner on Jul 10, 2019. It is now read-only.

Commit

Permalink
Added the multiauth:clear-reminders command
Browse files Browse the repository at this point in the history
  • Loading branch information
ollieread committed Feb 22, 2014
1 parent 6c9dfe0 commit 06027ea
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
33 changes: 33 additions & 0 deletions src/Ollieread/Multiauth/Console/ClearRemindersCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php namespace Illuminate\Auth\Console;

use Illuminate\Console\Command;

class ClearRemindersCommand extends Command {

/**
* The console command name.
*
* @var string
*/
protected $name = 'multiauth:clear-reminders';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Flush expired reminders.';

/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
$this->laravel['auth.reminder.repository']->deleteExpired();

$this->info('Expired reminders cleared!');
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
}

Expand Down

0 comments on commit 06027ea

Please sign in to comment.