Skip to content

Instantly share code, notes, and snippets.

@rachids
Created December 8, 2021 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rachids/c0d4a1d8b3aaf2ac3d61305838ee4426 to your computer and use it in GitHub Desktop.
Save rachids/c0d4a1d8b3aaf2ac3d61305838ee4426 to your computer and use it in GitHub Desktop.
Bunny Factory
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class BunnyFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array
*/
public function definition(): array
{
return [
'name' => $this->faker->userName,
'fluffiness' => $this->faker->numberBetween(1, 100),
'birth_date' => $this->faker->date(),
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment