スキル一覧に戻る
fusengine

laravel-eloquent

by fusengine

Redefining development through cognitive automation and collaborative agent systems.

0🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: laravel-eloquent description: Master Eloquent ORM with relationships, scopes, casts, observers, and query optimization. Use when creating models, defining relationships, writing queries, or optimizing database access. user-invocable: false

Laravel Eloquent ORM

Documentation

Eloquent Core

Model Template

<?php

declare(strict_types=1);

namespace App\Models;

final class Post extends Model
{
    protected $fillable = ['title', 'slug', 'content', 'user_id'];

    protected function casts(): array
    {
        return [
            'status' => PostStatus::class,
            'published_at' => 'datetime',
        ];
    }

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }

    public function scopePublished(Builder $query): Builder
    {
        return $query->where('status', PostStatus::Published);
    }
}

Query Optimization

// Eager loading (prevent N+1)
$posts = Post::with(['user', 'comments.user'])->get();

// Chunking for large datasets
User::chunk(100, function ($users) {
    foreach ($users as $user) { }
});

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です