← スキル一覧に戻る

scaffold-factory
by iurygdeoliveira
Repositorio destinado a fornecer um kit inicial para desenvolvimento de SaaS usando laravel e filament
⭐ 29🍴 12📅 2026年1月20日
SKILL.md
name: scaffold-factory description: Automates the creation of Laravel Factories with standardized Faker usage and essential state methods.
Laravel Factory Scaffold Skill
Use this skill when defining test data generators for Models.
Conventions
1. Sensible Faker Data
- Use
$this->fakermethods that match the column type contextually. - Email:
safeEmail()(never real emails). - Text:
paragraph()orsentence()depending on length. - Enums:
fake()->randomElement(Enum::cases()).
2. State Methods
- Create state methods for every boolean flag or status enum in the model.
- This makes tests readable:
User::factory()->active()->admin()->create().
public function admin(): static
{
return $this->state(fn (array $attributes) => [
'role' => UserRole::Admin,
]);
}
public function suspended(): static
{
return $this->state(fn (array $attributes) => [
'suspended_at' => now(),
]);
}
3. Relationships
- For "BelongsTo" relationships, create the parent factory by default in the definition.
'user_id' => User::factory(),
スコア
総合スコア
80/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
3ヶ月以内に更新
+5
✓フォーク
10回以上フォークされている
+5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
レビュー
💬
レビュー機能は近日公開予定です

