← Back to list

scaffold-observer
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-observer description: Standardizes Model Observers for handling side-effects of model events.
Laravel Observer Pattern Skill
Use this skill when you need to trigger logic based on Eloquent Model events (created, updated, deleted, etc.).
When to use
- Sending emails after user registration.
- Logging changes for audit entry.
- Updating summary tables.
Rules
1. Silent Handling
- Observers should handle exceptions gracefully or let them bubble up depending on criticality.
- Avoid putting slow blocking logic (like API calls) directly in Observer. Dispatch a Job/Event instead.
2. Registration
- Ensure the Observer is registered in the model attribute
#[ObservedBy(UserObserver::class)](Laravel 10+ standard) or inAppServiceProvider. - Prefer Attributes:
#[ObservedBy(UserObserver::class)]
class User extends Authenticatable
{
// ...
}
3. Methods
- Type hint the model in the observer methods.
public function created(User $user): void
{
// ...
}
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

