feat: first commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\MealPosts;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class MealPostsFactory extends Factory
|
||||
{
|
||||
protected $model = MealPosts::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'image_url' => $this->faker->imageUrl(),
|
||||
'caption' => $this->faker->word(),
|
||||
'calories' => $this->faker->randomNumber(),
|
||||
'proteins' => $this->faker->randomFloat(),
|
||||
'carbs' => $this->faker->randomFloat(),
|
||||
'fats' => $this->faker->randomFloat(),
|
||||
'title' => $this->faker->word(),
|
||||
'eaten_at' => Carbon::now(),
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
|
||||
'user_id' => User::factory(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user