← Back to list

scaffold-model
by iurygdeoliveira
Repositorio destinado a fornecer um kit inicial para desenvolvimento de SaaS usando laravel e filament
⭐ 29🍴 12📅 Jan 20, 2026
SKILL.md
name: scaffold-model description: Automates the creation of Laravel Models with strict typing, modern casting (method-based), and fully typed relationships.
Laravel Model Scaffold Skill
Use this skill to create or modify Eloquent Models.
Rules
1. Structure
- Strict Types: Always
declare(strict_types=1);. - Final: Models should be
finalunless they are explicitly designed for inheritance. - Fillable: Prefer
$fillableover$guardedfor explicit security.
2. Modern Casting (Laravel 12)
- Use the
casts(): arraymethod (Laravel 11+), NOT the$castsproperty. - Use Enums for status columns and native types.
protected function casts(): array
{
return [
'status' => TicketStatus::class,
'published_at' => 'datetime',
'is_active' => 'boolean',
'options' => 'array',
];
}
3. Relationships
- Always add return types to relationship methods (
BelongsTo,HasMany, etc.). - Import the relation classes (
Illuminate\Database\Eloquent\Relations\BelongsTo).
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
4. Scopes
- Use
Buildertype hint for scopes.
public function scopeActive(Builder $query): void
{
$query->where('is_active', true);
}
Score
Total Score
80/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
✓最近の活動
1ヶ月以内に更新
+10
✓フォーク
10回以上フォークされている
+5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
✓タグ
1つ以上のタグが設定されている
+5
Reviews
💬
Reviews coming soon

