Nenhuma descrição

ProfessorSectionFactory.php 554B

1234567891011121314151617
  1. <?php
  2. /* @var $factory \Illuminate\Database\Eloquent\Factory */
  3. use App\Model;
  4. use Faker\Generator as Faker;
  5. use App\Section;
  6. $factory->define(Model::class, function (Faker $faker) {
  7. return [
  8. 'professor_id' => $faker->randomNumber(1, Professor::count()),
  9. 'section_id' => $faker->randomNumber(1, Section::count()),
  10. 'percent' => $faker->optional()->randomNumber(1, 100),
  11. 'schedule' => $faker->optional()->dateTime,
  12. 'eval' => $faker->optional()->randomFloat(2, 0, 100),
  13. ];
  14. });