%PDF- %PDF-
Direktori : /proc/self/root/home/forge/api-takeaseat.eco-n-tech.co.uk/database/factories/ |
Current File : //proc/self/root/home/forge/api-takeaseat.eco-n-tech.co.uk/database/factories/TherapistFactory.php |
<?php namespace Database\Factories; use App\Models\User; use App\Models\Therapist; use Illuminate\Database\Eloquent\Factories\Factory; class TherapistFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Therapist::class; /** * Define the model's default state. * * @return array */ public function definition() { $coloursArray = ['yellow', 'blue', 'lightblue', 'green', 'red']; $randColourKey = array_rand($coloursArray); return [ 'user_id' => User::factory(), 'colour' => $coloursArray[$randColourKey], 'approach_text' => $this->faker->text($maxNbChars = 500), 'description' => '<p>'.implode('</p><p>', $this->faker->paragraphs($nb = 5, $asText = false)).'</p>', 'specialism_id' => $this->faker->numberBetween(1, 3), 'is_complete' => true, 'is_authorised' => true ]; } }