Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Laravel ModelNew to Visual Studio Code? Get it now.
Laravel Model

Laravel Model

Loai Kanou

|
1 install
| (1) | Free
Code actions, diagnostics, and CodeLens for Eloquent model properties ($fillable, $guarded, $casts, $hidden, $appends) + relations DocBlocks.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Laravel Model

VS Code tooling for Eloquent properties: $fillable, $guarded, $casts, $hidden, $appends + relation DocBlocks.

Why

  • Reduce mass-assignment mistakes.
  • Keep model props explicit and discoverable.
  • Developer experience: CodeLens, quick fixes, docblocks.

Features

  • Diagnostics for risky patterns (no $fillable/$guarded, ['*'] guarded).
  • Quick Fixes to add attributes to arrays.
  • Generate $fillable from detected mass-assignment usage.
  • CodeLens summary.
  • Sync DocBlocks with attributes and relations.

Settings

  • laravelModels.migrationGlobs: Parse migrations for extra hints.
  • laravelModels.enableDbAware: Allow php artisan calls (opt-in).
  • laravelModels.artisanPath: Customize artisan command.

Roadmap

  • Optional AST via php-parser for robust parsing.
  • DB-aware fillable suggestions via artisan model:show.
  • Casts editor UI (pickers).

Development

npm i
npm run build
# Press F5 in VS Code to launch the Extension Development Host

License

MIT

By: Loai Kanou

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft