%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/PostFactory.php |
<?php namespace Database\Factories; use App\Models\User; use App\Models\Post; use Illuminate\Database\Eloquent\Factories\Factory; class PostFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Post::class; /** * Define the model's default state. * * @return array */ public function definition() { $randNumber = $this->faker->numberBetween(1, 100); return [ 'user_id' => $randNumber, 'therapist_id' => $randNumber, 'thumbnail_url' => $this->faker->imageUrl($width = 640, $height = 640), 'image_url' => $this->faker->imageUrl($width = 2500, $height = 1500), 'title' => $this->faker->sentence($nbWords = 6, $variableNbWords = true), 'content' => '<p>'.implode('</p><p>', $this->faker->paragraphs($nb = 20, $asText = false)).'</p>', 'is_published' => true ]; } }