Skip to content

Hints ​

Hints point at places where the database and the models disagree. They are informational: the Hints tab lists them, the table card shows a count, and schema-viewer:check can fail your CI on the kinds you choose. Framework tables never get hints.

KindMeaningUsual fix
relation_without_foreign_keyA relation uses columns with no foreign key, so rows can point at deleted onesAdd a foreign key in a migration, or ignore it when intended
foreign_key_without_relationA foreign key that no model declaresAdd the belongsTo / hasMany pair
foreign_key_without_indexA foreign key column with no index that starts with it (PostgreSQL, SQLite and SQL Server do not add one)Add an index
model_without_tableA model whose table does not exist on its connectionRun the migration, or fix $table / $connection
morph_without_mapMorph columns store class names such as App\Models\Post, so renaming a model breaks rowsRegister Relation::enforceMorphMap()
unresolved_relationA relation method threw when calledFix the method

Polymorphic relations and relations across connections cannot have a foreign key, so they never get relation_without_foreign_key.

Ignoring hints ​

Accept a hint for good in config/schema-viewer.php, by kind or for one table:

php
'hints' => [
    'ignore' => ['morph_without_map', 'relation_without_foreign_key:audit_logs'],
],