12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- /*
- * This file is part of the Jiannei/lumen-api-starter.
- *
- * (c) Jiannei <longjian.huang@foxmail.com>
- *
- * This source file is subject to the MIT license that is bundled
- * with this source code in the file LICENSE.
- */
- namespace Database\Factories;
- use App\Repositories\Models\User;
- use Illuminate\Database\Eloquent\Factories\Factory;
- use Illuminate\Support\Facades\Hash;
- class UserFactory extends Factory
- {
- /**
- * The name of the factory's corresponding model.
- *
- * @var string
- */
- protected $model = User::class;
- /**
- * Define the model's default state.
- *
- * @return array
- */
- public function definition()
- {
- return [
- 'name' => $this->faker->name,
- 'email' => $this->faker->unique()->safeEmail,
- 'password' => Hash::make('password'),
- ];
- }
- }
|