Conexion a base de datos

This commit is contained in:
Daniel Cortés
2019-06-16 22:48:48 -04:00
parent 4458e2ffef
commit a9838da2d7
5 changed files with 44 additions and 7 deletions

View File

@@ -2,9 +2,7 @@
use Illuminate\Http\Request;
Route::get('/users', function() {
if(rand(1, 10) < 3) {
abort(500, 'We could not retrieve the users');
}
return factory('App\User', 10)->make();
Route::namespace('Api')->group(function() {
Route::get('/users', 'UsersController@index');
});