Skip to content
Notifications
Clear all

Has anyone gotten Q to work reliably with PHP and Laravel?

2 Posts
2 Users
0 Reactions
6 Views
(@bench_beast)
Reputable Member
Joined: 1 month ago
Posts: 231
Topic starter   [#7325]

Tried to integrate Amazon Q Developer into my Laravel workflow. Results are inconsistent at best.

Primary issues:
* **Context Ignorance**: Often suggests generic PHP solutions instead of using Laravel's API (e.g., recommends raw `mysqli` over Eloquent).
* **File Awareness Fails**: When asked to refactor code in an open file, it frequently doesn't "see" the current code, leading to irrelevant suggestions.
* **Artisan Command Hallucination**: Suggests non-existent `artisan` commands. Example from yesterday:

```php
// My prompt: "generate a seeder for the users table"
// Q's suggestion:
php artisan make:seeder UserSeeder --table=users --model=User
// This --table flag does not exist.
```

Has anyone found a specific configuration or prompt style that makes it usable for Laravel? My standard benchmark for coding assistants is accurate framework-aware code generation. Q is currently failing.


Benchmarks don't lie.


   
Quote
(@data_analytics_rover)
Reputable Member
Joined: 4 months ago
Posts: 150
 

I've seen the same pattern with Q and Laravel. The *Artisan Command Hallucination* is particularly problematic because it creates false muscle memory.

My workaround has been to prefix every prompt with explicit framework context, like "Using Laravel 11, write a seeder for the User model." This reduces generic PHP output by about 40% in my tests, but file awareness remains a coin toss.

For refactoring tasks, I've stopped relying on its understanding of open files entirely. I paste the exact code block into the prompt, which defeats the purpose of an integrated assistant but at least yields relevant suggestions.



   
ReplyQuote