Pull in changes from laravel upstream

This commit is contained in:
Kevin MacMartin 2016-08-22 14:34:21 -04:00
parent 3788e412d5
commit 5cf20c3424
4 changed files with 6 additions and 4 deletions

View file

@ -1 +1 @@
268953862ff649ccf186e6740cd2e9af40b8906a
e959c228400341d4f2f8812606a0b16d740a2f2d

View file

@ -69,7 +69,7 @@ class RouteServiceProvider extends ServiceProvider
protected function mapApiRoutes()
{
Route::group([
'middleware' => ['api', 'auth:api'],
'middleware' => 'api',
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {

View file

@ -12,10 +12,12 @@
*/
$factory->define(App\User::class, function (Faker\Generator $faker) {
static $password;
return [
'name' => $faker->name,
'email' => $faker->safeEmail,
'password' => bcrypt(str_random(10)),
'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
];
});

View file

@ -15,4 +15,4 @@ use Illuminate\Http\Request;
Route::get('/user', function (Request $request) {
return $request->user();
});
})->middleware('auth:api');