Skip to content

Instantly share code, notes, and snippets.

@tanner0101
Last active October 26, 2016 23:54
Show Gist options
  • Save tanner0101/67a008161919ebf43e3b0b3ef484b7b2 to your computer and use it in GitHub Desktop.
Save tanner0101/67a008161919ebf43e3b0b3ef484b7b2 to your computer and use it in GitHub Desktop.
Laravel Benchmark
<?php
use DB;
Route::get('/plaintext', function() {
return 'Hello, world!';
});
Route::get('/json', function() {
return [
'array' => [1, 2, 3],
'dict' => [
'one' => 1,
'two' => 2,
'three' => 3
],
'int' => 42,
'string' => 'test',
'double' => 3.14,
'null' => null
];
});
Route::get('/sqlite-fetch', function() {
return DB::select('SELECT * FROM users ORDER BY random() LIMIT 1');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment