AdminUserFactory.php 426 B

123456789101112131415161718
  1. <?php
  2. /* @var $factory \Illuminate\Database\Eloquent\Factory */
  3. use Faker\Generator as Faker;
  4. use App\Models\AdminUser;
  5. use Illuminate\Http\UploadedFile;
  6. use Illuminate\Support\Facades\Storage;
  7. $factory->define(AdminUser::class, function (Faker $faker) {
  8. static $pw;
  9. return [
  10. 'username' => $faker->userName,
  11. 'password' => $pw ?: ($pw = bcrypt('000000')),
  12. 'name' => $faker->name,
  13. ];
  14. });