MusicFactory.php 568 B

123456789101112131415161718
  1. <?php
  2. /** @var \Illuminate\Database\Eloquent\Factory $factory */
  3. use App\Music;
  4. use Faker\Generator as Faker;
  5. $factory->define(Music::class, function (Faker $faker) {
  6. return [
  7. 'title' => $faker->sentence(),
  8. 'description' =>$faker->paragraph(),
  9. 'played' => $faker->randomDigit(),
  10. 'downloads' => $faker->randomDigit(),
  11. 'hidden' => false,
  12. 'file_name' => $faker->randomElement(['public/audio/album/audio.mp3','public/audio/songs/sample.mp3']),
  13. 'type' => $faker->randomElement(['dir','txt','mp3']),
  14. ];
  15. });