Laravel Eloquent Discipline

This skill should be used when the agent writes or edits Eloquent models, controllers, actions, jobs, or repositories — specifically when it calls create(), update(), fill(), forceFill(), all(), get(), whereRaw, orderByRaw, selectRaw, DB::raw, or mass update()/delete(); when it touches $fillable, $guarded, $casts, $appends, unguard(), updateOrCreate, firstOrCreate, or upsert; or when it passes request()->all()/$request->all() into a model. Also load when reviewing migrations-to-model mapping, dealing with money/decimal/boolean/date/enum/JSON columns, exporting or iterating large tables, or wiring user-supplied sort/filter parameters into a query. Keywords — mass assignment, MassAssignmentException, SQL injection, casts, fillable, guarded, unbounded query, memory exhaustion, chunk, cursor, lazy, paginate.

shaxzodbek-uzb Updated

File contents

shaxzodbek-uzb/laravel-guardrails/tree/main/skills/laravel-eloquent-discipline commit 9b906548ad

Frequently asked questions

npx skillmds@latest add shaxzodbek-uzb/laravel-eloquent-discipline