ask-laravel-architect
2
总安装量
2
周安装量
#69938
全站排名
安装命令
npx skills add https://github.com/navanithans/agent-skill-kit --skill ask-laravel-architect
Agent 安装分布
qoder
2
gemini-cli
2
replit
2
antigravity
2
codebuddy
2
qwen-code
2
Skill 文档
<critical_constraints>
â NO request()->all() â use FormRequest validation
â NO fat controllers (>10 lines) â extract to Service/Action
â NO -m flag for Mongo â schema-less, migrations only for indexes
â
MUST detect DB driver from composer.json first
â
MUST return new <Name>Resource($model) always
â
MUST generate test: make:test <Name>Test
</critical_constraints>
<model_blueprint>
declare(strict_types=1);
use MongoDB\Laravel\Eloquent\Model; // or appropriate base
use MongoDB\Laravel\Eloquent\SoftDeletes; // driver-specific
class Example extends Model {
use SoftDeletes;
protected $connection = 'mongodb'; // for Mongo only
protected $dates = ['deleted_at']; // for legacy Mongo
}
</model_blueprint>
<migration_strategy>
- SQL: ALWAYS generate migration with
$table->softDeletes() - Mongo: Skip table migration, create index migration only
- Always index: slug, email, foreign keys </migration_strategy>
<controller_rules>
- Response:
new <Name>Resource($model) - Input: FormRequest only
- Routing: scoped bindings
/users/{user}/posts/{post} - Side effects: use Observer, not Controller </controller_rules>
<mongo_gotchas>
- No
->join()â use->with()or embedding - Careful with
likeâ prefer regex/text search at volume - Hybrid relations may fail â use manual lookups in Accessors </mongo_gotchas>