Нема описа

ProfessorSemesterFactory.php 512B

12345678910111213141516
  1. <?php
  2. /* @var $factory \Illuminate\Database\Eloquent\Factory */
  3. use App\Model;
  4. use Faker\Generator as Faker;
  5. use App\Semester;
  6. $factory->define(Model::class, function (Faker $faker) {
  7. return [
  8. 'professor_id' => $faker->randomNumber(1, Professor::count()),
  9. 'semester_code' => $faker->randomElement(Semester::all()->pluck('code')->toArray()),
  10. 'admin_load' => $faker->randomFloat(2, 0, 100),
  11. 'investigative_load' => $faker->randomFloat(2, 0, 100),
  12. ];
  13. });