Created
December 1, 2016 05:39
-
-
Save nick-f/122b1ff6a88034a68bdce26434cb3c1e to your computer and use it in GitHub Desktop.
Generate random data for Laravel Spark metrics to show off the graphs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Route::get('/metricsdummy', function() { | |
for ($i = 0; $i < 100; $i++) { | |
DB::table('performance_indicators')->insert([ | |
'monthly_recurring_revenue' => mt_rand(1000, 2000), | |
'yearly_recurring_revenue' => mt_rand(50000, 60000), | |
'daily_volume' => mt_rand(100, 300), | |
'new_users' => mt_rand(50, 100), | |
'created_at' => Carbon\Carbon::now()->subDays($i), | |
'updated_at' => Carbon\Carbon::now()->subDays($i), | |
]); | |
} | |
return 'Done!'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment