Interactive Demo
Explore the 6 demo models and see what the analyzer detects.
Model Map
User
OKApp\Models\User
posts (hasMany)
comments (hasMany)
orders (hasMany)
Post
WARNINGApp\Models\Post
user (belongsTo)
editor (belongsTo)
comments (hasMany)
tags (belongsToMany)
Missing index on `editor_id`
Comment
WARNINGApp\Models\Comment
user (belongsTo)
post (belongsTo)
reaction (hasOne)
Reaction inverse missing — model does not exist
Tag
OKApp\Models\Tag
posts (belongsToMany)
Order
OKApp\Models\Order
user (belongsTo)
products (hasMany)
Product
ERRORApp\Models\Product
order (belongsTo)
category (belongsTo)
Foreign key column `category_id` does not exist
Command Output
Scanning models in: app/Models Found 6 models Analyzing relationships... User .............. OK (4 relationships, no issues) Post .............. WARN (missing index on `editor_id`) Comment ........... WARN (Reaction inverse missing) Tag ............... OK (1 relationship, no issues) Order ............. OK (1 relationship, no issues) Product ........... ERROR (foreign key column `category_id` does not exist) ────────────────────────────────────────────────────── Issues found: 1 error, 2 warnings Health Score: 62 / 100 ────────────────────────────────────────────────────── [ERROR] Product::belongsTo(Category) → Column `category_id` not found on `products` table [WARNING] Post → Column `editor_id` has no index (performance risk) [WARNING] Comment::hasOne(Reaction) → No inverse relationship found on Reaction model