Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F53428839
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/app/Console/Commands/AccountDump.php b/app/Console/Commands/AccountDump.php
new file mode 100644
index 0000000..17c12a8
--- /dev/null
+++ b/app/Console/Commands/AccountDump.php
@@ -0,0 +1,50 @@
+<?php
+
+namespace AuthGrove\Console\Commands;
+
+use Illuminate\Console\Command;
+use AuthGrove\User as User;
+
+class AccountDump extends Command
+{
+ /**
+ * The name and signature of the console command.
+ *
+ * @var string
+ */
+ protected $signature = 'account:dump';
+
+ /**
+ * The console command description.
+ *
+ * @var string
+ */
+ protected $description = 'Dumps the accounts list.';
+
+ /**
+ * Create a new command instance.
+ *
+ * @return void
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+ /**
+ * Execute the console command.
+ *
+ * @return mixed
+ */
+ public function handle()
+ {
+ $attributes = User::getDefaultAttributes();
+ $headers = array_map('\AuthGrove\User::localizeAttribute', $attributes);
+
+ $users = User::all($attributes)->toArray();
+
+ $this->table($headers, $users);
+
+ return;
+ }
+}
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index f9bf9f9..e235c6d 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -1,30 +1,31 @@
<?php namespace AuthGrove\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel {
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
'AuthGrove\Console\Commands\AccountInfo',
+ 'AuthGrove\Console\Commands\AccountDump',
'AuthGrove\Console\Commands\Inspire',
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('inspire')
->hourly();
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Oct 11, 21:13 (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4172993
Default Alt Text
(2 KB)
Attached To
Mode
rGROVE Auth Grove
Attached
Detach File
Event Timeline
Log In to Comment