Laravel projects
Connect from your .env in one step, follow Eloquent-style relationships without foreign keys, read casts as labels, and preview migration SQL before it runs.
Querly understands Laravel conventions. Some of this works from the database alone; the rest lights up when you attach the project folder. Nothing runs PHP unless you ask it to.
| Feature | Needs |
|---|---|
Relationships from *_id columns, polymorphic types | A Laravel database |
Find projects, connect from .env, Sail ports | The project folder |
| Enum and cast labels, model shortcuts, pending migrations | An attached project |
| Migration SQL preview | An attached project and PHP |
Connect from your project
The Welcome screen lists Laravel projects already on your Mac. Querly looks in ~/Herd first, then common folders such as ~/Code, ~/Sites, and ~/Projects, and only checks for artisan and .env. Pick a project and Querly creates the connection from its .env.
Laravel Sail: inside Docker, .env says DB_HOST=mysql, which does not work from your Mac. Querly detects Sail and connects to 127.0.0.1 on FORWARD_DB_PORT instead. Redis gets the same fix.
Attach a project to a connection
Choose Attach Laravel Project… and select the folder. Querly scans models and migrations on a background queue, so the grid stays responsive. Use Change Laravel Project… or Detach Laravel Project later.
Relationships without foreign keys
Laravel apps often skip foreign-key constraints. Querly recognises a Laravel database from its migrations table and infers links from naming: user_id points to users.id. Those cells get the same chevron as real foreign keys, so one click opens the related row.
Polymorphic relationships: for commentable_id, Querly reads the row's commentable_type, such as App\Models\Post, and opens the posts table. Custom aliases from your morph map are read from the attached project.
See Relationships and foreign keys for every way to navigate.
Values as your app sees them
With a project attached, Querly reads each model's $casts and shows friendlier values in the grid:
| Stored value | Shown as | Why |
|---|---|---|
2 | 2 · Shipped | A backed enum cast |
eyJpdiI6… | 🔒 Encrypted | An encrypted cast |
| A queue payload | ⚙︎ App\Jobs\SendInvoice | jobs and failed_jobs lead with the job class |
Labels change what you read, never the data. Editing, copying, filtering, and sorting still use the raw stored value.
Jump to the model
When a table matches an Eloquent model, its toolbar menu shows Open Eloquent Model, which opens the PHP file in your editor.
Pending migrations and SQL preview
The sidebar shows how many migrations have not run against this database. Click a name to open the file.
Choose Preview SQL (migrate --pretend)… to see the exact SQL Laravel would run, without changing the schema. Querly uses vendor/bin/sail artisan on Sail projects and php artisan otherwise. Review the SQL, then run php artisan migrate in your terminal.
Booting artisan runs your project's own PHP and connects to the database in its .env. Querly asks for permission once per project folder. Closing the preview stops the command.
Turn data into code
- Copy Query as Eloquent: the table's current filter becomes an Eloquent query you can paste into your app.
- Copy Special → PHP Array: selected rows become a PHP array for a seeder or factory, with exact escaping.
- Generate Laravel Migration…: create a migration and model from the current table. Querly previews the PHP, never overwrites an existing file, and marks any column type it cannot map with a
// TODO.
Only the migration preview needs PHP. Install it with Laravel Herd or Homebrew (brew install php).