Skip to content

Instantly share code, notes, and snippets.

@jadenlemmon
Created February 19, 2021 18:43
Show Gist options
  • Save jadenlemmon/0a41e0977e37156544168019ea6dff25 to your computer and use it in GitHub Desktop.
Save jadenlemmon/0a41e0977e37156544168019ea6dff25 to your computer and use it in GitHub Desktop.
ProjectFactory
class ProjectFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Project::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->name,
'description' => $this->faker->paragraph(),
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment