Free PhpStorm plugin
Model attribute names that are right the first time.
Resource Lens completes, links and checks Eloquent model attribute names in Laravel admin panel resources built with Filament 4 and 5. It reads your migrations and model classes inside PhpStorm, so a column name typed by you or written by an AI assistant is checked against the model before you open the browser.
return $table->columns([
TextColumn::make('title'),
TextColumn::make('author.full_name'),
TextColumn::make('created_at'),
]);
Warning Unknown attribute 'full_name' on App\Models\User
users table has name, not full_name. The author segment is fine: it is a relationship on Post.What the plugin does
Five features, all read from your own project's code. No setup, no server, no account.
- Completion
- Model attributes and relationships inside
TextInput::make('…'),TextColumn::make('…'),Select::make('…')and the other form field, table column, infolist entry and filter constructors. After a dot it offers the related model's names:author.lists the user's columns and relationships. - Go to declaration
- Ctrl-click (Cmd-click on macOS) a name to jump to where it is declared: the migration column,
@propertytag, cast, fillable or$appendsentry, accessor, or relationship method. - Unknown attribute warning
- On core table columns and infolist entries whose name matches no attribute or relationship of the model, checking every segment of a path such as
author.name. Alt+Enter changes the name to the closest one the model declares, such asfull_nametoname. It stays silent whenever it cannot be certain (see below). - Searchable and sortable check
->searchable()or->sortable()on an accessor, cast or other name that is not a database column fails at runtime with an SQL "Unknown column" error. Resource Lens warns before you open the browser, and stays quiet when you pass the columns to search or aquery:callback.- Rename and gutter links
- Renaming an accessor or relationship method updates the
make('…')names that use it. A gutter icon links each Resource to its model and each model back to its Resources.
Install
PhpStorm 2025.3 or newer, on a Laravel project with Filament 4 or 5.
Open Plugins
In PhpStorm, open Settings (Preferences on macOS) and choose Plugins, then the Marketplace tab.
Search
Search for "Resource Lens", click Install, and restart the IDE if it asks.
Open a Resource
Open a Resource, form schema or table class and press Ctrl+Space inside a
make('')string.
The gutter icon can be switched off in Settings | Editor | General | Gutter Icons, and the warning in Settings | Editor | Inspections | Resource Lens.
When the warning stays silent
A wrong warning on correct code teaches people to switch the check off, so Resource Lens says nothing unless it is certain.
The warning checks these classes exactly (not subclasses): TextColumn, IconColumn, ImageColumn, ColorColumn, ToggleColumn, TextInputColumn, SelectColumn, CheckboxColumn, TextEntry, IconEntry, ImageEntry, ColorEntry and KeyValueEntry. It says nothing when:
- The component is a form field or a filter (virtual fields such as
password_confirmationare legitimate), or a subclass or plugin column. - The chain after
make()gives the state another source:state,getStateUsing,counts,exists,avg,sum,min,max,view,rowIndex,default,placeholder. - The name ends in
_countor_exists, or is not a plain dotted name. - The component sits inside a repeater, a Builder block, a filter's schema,
->relationship(),->statePath(),->record(),->model(),->records(), or a table with its own->query(). - The table calls
modifyQueryUsing, or the Resource or one of its parent classes declaresgetEloquentQuery. - The component is built outside a
columns(),components()orschema()array. - The model cannot be resolved with certainty, or a class other than a Resource (a relation manager, a Livewire component) also configures the table or schema.
- The model's columns are not fully known: its migrations use macros, helpers, computed Blueprint methods or raw SQL. Docblock
@propertytags add names to completion but never make the column list complete.
Migrations are read from every database/migrations directory in the project, except under vendor/. Duplicate model classes written by laravel-ide-helper are ignored.
Your code stays on your machine
Resource Lens collects no data and makes no network calls. See the privacy note and the licence agreement.
Resource Lens is an independent project by Creet. It is not affiliated with or endorsed by Filament, Laravel or JetBrains. PhpStorm is a trademark of JetBrains s.r.o.; Filament and Laravel are trademarks of their respective owners. Questions and bug reports: support@creet.in.