mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-21 23:52:31 -05:00
Pull in changes from laravel upstream
This commit is contained in:
parent
3788e412d5
commit
5cf20c3424
4 changed files with 6 additions and 4 deletions
|
@ -1 +1 @@
|
||||||
268953862ff649ccf186e6740cd2e9af40b8906a
|
e959c228400341d4f2f8812606a0b16d740a2f2d
|
||||||
|
|
|
@ -69,7 +69,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
protected function mapApiRoutes()
|
protected function mapApiRoutes()
|
||||||
{
|
{
|
||||||
Route::group([
|
Route::group([
|
||||||
'middleware' => ['api', 'auth:api'],
|
'middleware' => 'api',
|
||||||
'namespace' => $this->namespace,
|
'namespace' => $this->namespace,
|
||||||
'prefix' => 'api',
|
'prefix' => 'api',
|
||||||
], function ($router) {
|
], function ($router) {
|
||||||
|
|
|
@ -12,10 +12,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$factory->define(App\User::class, function (Faker\Generator $faker) {
|
$factory->define(App\User::class, function (Faker\Generator $faker) {
|
||||||
|
static $password;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'name' => $faker->name,
|
'name' => $faker->name,
|
||||||
'email' => $faker->safeEmail,
|
'email' => $faker->safeEmail,
|
||||||
'password' => bcrypt(str_random(10)),
|
'password' => $password ?: $password = bcrypt('secret'),
|
||||||
'remember_token' => str_random(10),
|
'remember_token' => str_random(10),
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
|
@ -15,4 +15,4 @@ use Illuminate\Http\Request;
|
||||||
|
|
||||||
Route::get('/user', function (Request $request) {
|
Route::get('/user', function (Request $request) {
|
||||||
return $request->user();
|
return $request->user();
|
||||||
});
|
})->middleware('auth:api');
|
||||||
|
|
Loading…
Reference in a new issue