ask-laravel-architect

<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

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ask-laravel-architect" with this command: npx skills add navanithans/agent-skill-kit/navanithans-agent-skill-kit-ask-laravel-architect

<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>

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

ask-shadcn-architect

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

ask-nextjs-architect

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

ask-skill-creator

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

ask-commit-assistance

No summary provided by upstream source.

Repository SourceNeeds Review