update deploy
This commit is contained in:
45
database/factories/CourseFactory.php
Normal file
45
database/factories/CourseFactory.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Category;
|
||||
use App\Models\Course;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends Factory<Course>
|
||||
*/
|
||||
class CourseFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$title = fake()->unique()->words(3, true);
|
||||
|
||||
return [
|
||||
'category_id' => Category::factory(),
|
||||
'slug' => Str::slug($title),
|
||||
'title' => ucfirst($title),
|
||||
'sub' => fake()->optional()->word(),
|
||||
'desc' => fake()->paragraph(),
|
||||
'long_desc' => fake()->paragraphs(3, true),
|
||||
'duration' => fake()->randomElement(['3 Gün', '5 Gün', '10 Gün', '2 Hafta']),
|
||||
'students' => fake()->numberBetween(0, 500),
|
||||
'rating' => fake()->randomFloat(1, 3.0, 5.0),
|
||||
'badge' => fake()->optional()->randomElement(['Simülatör', 'Online', 'Yüz Yüze']),
|
||||
'image' => null,
|
||||
'price' => fake()->optional()->randomElement(['2.500 TL', '5.000 TL', '7.500 TL', '10.000 TL']),
|
||||
'includes' => fake()->words(4),
|
||||
'requirements' => fake()->words(3),
|
||||
'meta_title' => fake()->sentence(4),
|
||||
'meta_description' => fake()->sentence(10),
|
||||
'scope' => fake()->words(5),
|
||||
'standard' => fake()->optional()->randomElement(['STCW Uyumlu', 'IMO Uyumlu', 'STCW / IMO Uyumlu']),
|
||||
'language' => 'Türkçe',
|
||||
'location' => fake()->optional()->randomElement(['Kadıköy, İstanbul', 'Tuzla, İstanbul', 'Beşiktaş, İstanbul']),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user