Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Database\Factories;
- use App\Models\User;
- use App\Models\Workshop;
- use Illuminate\Database\Eloquent\Factories\Factory;
- class WorkshopFactory extends Factory
- {
- /**
- * The name of the factory's corresponding model.
- *
- * @var string
- */
- protected $model = Workshop::class;
- /**
- * Define the model's default state.
- *
- * @return array
- */
- public function definition()
- {
- return [
- 'category_workshop' => $this->faker->randomElement(['Art & Media','Business','Economy','Management','Marketing','Science']),
- 'title' => $this->faker->title,
- 'flyer' => $this->faker->imageUrl('200','300'),
- 'date' => $this->faker->date(),
- 'status' => $this->faker->randomElement(['draft','active-class','inacvtive-class','in reveiew']),
- 'status_icon' => $this->faker->imageUrl('50','50'),
- 'admission' => $this->faker->randomElement(['free','paid']),
- 'time_start' => $this->faker->time(),
- 'platform' => $this->faker->randomElement(['zoom','google meet']),
- 'refundable' => $this->faker->randomElement(['yes','no']),
- 'reschedule'=>$this->faker->randomElement(['yes','no']),
- 'description'=>$this->faker->paragraph(12),
- 'class_type'=>$this->faker->randomElement(['workshop','webinar','online voucher','short course']),
- 'requirement'=>$this->faker->paragraph(5),
- 'ticket_include_title' => $this->faker->words(4),
- 'ticket_include_icon' => $this->faker->image(),
- 'capacity' => $this->faker->randomNumber(2),
- 'media_type' => $this->faker->randomElement(['online','offline']),
- 'location' => $this->faker->city,
- 'content'=>$this->faker->paragraph(20),
- 'link_workshop'=>$this->faker->url,
- 'address'=>$this->faker->address,
- 'price_workshop' => $this->faker->numberBetween(50000,500000),
- 'user_id'=> User::all()->random()->id,
- 'status_ticket' => $this->faker->randomElement(['avilable','sold out','comming soon']),
- 'workshop_speaker_name' => $this->faker->name,
- 'workshop_speaker_background' => $this->faker->words(5),
- 'workshop_speaker_description'=>$this->faker->paragraph(12),
- 'workshop_speaker_photo'=>$this->faker->imageUrl(80,100),
- ];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement