返回顶部
L

Laravel

Build robust Laravel apps avoiding Eloquent traps, queue failures, and auth pitfalls.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
1,241
下载量
4
收藏
概述
安装方式
版本历史

Laravel

## Quick Reference | Topic | File | |-------|------| | N+1 queries, eager loading, accessors, observers | `eloquent.md` | | Validation, middleware order, dependency injection | `controllers.md` | | Job serialization, retries, failed jobs | `queues.md` | | Guards, policies, gates, Sanctum tokens | `auth.md` | | XSS escaping, components, slots | `blade.md` | | Commands, scheduling, tinker | `artisan.md` | ## Critical Rules - Eager load relationships — `with('posts')` not lazy `->posts` in loop (N+1) - `preventLazyLoading()` in dev AppServiceProvider — crashes on N+1, catches early - `env()` only in config files — returns null after `config:cache` - `$fillable` whitelist fields — `$guarded = []` allows mass assignment attacks - `find()` returns null — use `findOrFail()` to avoid null checks - Job properties serialize models as ID — re-fetched on process, may be stale/deleted - `route:cache` requires controller routes — closures break cached routes - `DB::transaction()` doesn't catch `exit`/timeout — only exceptions roll back - `RefreshDatabase` uses transactions — faster than `DatabaseMigrations` - `{!! $html !!}` skips escaping — XSS vector, use `{{ }}` by default - Middleware order matters — earlier middleware wraps later execution - `required` validation passes empty string — use `required|filled` for content - `firstOrCreate` persists immediately — `firstOrNew` returns unsaved model - Route model binding uses `id` — override `getRouteKeyName()` for slug

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 laravel-1776328641 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 laravel-1776328641 技能

通过命令行安装

skillhub install laravel-1776328641

下载 Zip 包

⬇ 下载 Laravel v1.0.1

文件大小: 4.43 KB | 发布时间: 2026-4-17 16:23

v1.0.1 最新 2026-4-17 16:23
Initial release

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部