Naykel Laravel Best Practices
Naykel-specific patterns and rules for Laravel code. These extend the general
laravel-best-practices skill — apply both, with this skill taking precedence
where they conflict.
Quick Reference
Read the relevant rule file before responding — do not rely on summaries alone.
Routing → rules/routing.md
- Admin edit routes must use
{model:id}, not{model} - Public-facing routes may continue to use slug-based binding
Components → rules/components.md
- Base handles all logic; variants are thin wrappers that compose the base
- Use Blade-only unless computed logic is needed; then add a PHP class
- Use
@awarefor shared props between base and variants
Database Design → rules/database-design.md
- Ask whether to update an existing migration or create a new forward migration
- Update the project's schema/design document when any schema or constraint changes
- Follow the standard column reference for names, types, and ordering