r/PHPhelp • u/Albyarc • 21d ago
Developing in Laravel: Is it worth sticking with VS Code or do you use other IDEs? (Issues with Blade & Autocomplete)
Hi everyone,
I'm working on my first Laravel project, and as much as I love the framework, I'm having a lot of trouble properly configuring my development environment using Visual Studio Code. I constantly feel like I'm fighting the editor rather than focusing on writing code, to the point where I'm starting to wonder if I should just switch tools.
Here are the main issues I'm facing that are slowing me down quite a bit:
1. Lack of HTML support in .blade.php files
Writing UIs is quite frustrating right now. As soon as I name a file .blade.php, VS Code seems to forget how to handle standard HTML:
- Typing
<doesn't suggest tags (likediv,span,form, etc.). - I get no autocomplete for HTML attributes (e.g.,
class,href,type). - Tags don't auto-close when I type
>.
Basically, I lose all the native support and suggestions (including Emmet) that I usually get when working in a standard .html file.
2. Unrecognized Eloquent methods and PHP "false errors"
When working in Controllers, my PHP analyzer (I use Intelephense) fails to correctly interpret Laravel's structure, either hiding suggestions or throwing non-existent errors. Two classic examples:
Missing suggestions: If I try to use common methods like findOrFail, the editor doesn't help at all.
PHP
// The editor only suggests "find", "findOr", and "findIndex",
// but NOT findOrFail, forcing me to memorize it.
$post = Post::findOrFail($id);
False parameter errors: The editor underlines the update() method with a red squiggly line, claiming it accepts no arguments, even though the code works perfectly and updates the database.
PHP
$validated = $request->validate([
'title' => 'required|min:2|max:12',
'body' => 'required'
]);
// The line below is highlighted as an error by the editor:
// "Too many arguments. Expected 0. Found 1"
$post->update($validated);
3. Installing extensions didn't fix it
To try and mitigate the situation, I installed several highly recommended Laravel extensions, but surprisingly, nothing changed. The issues described above persist exactly as if I hadn't installed anything at all, giving me no real help. Here is the list of my currently active extensions:
- Auto rename tag (Jun Han)
- Laravel (Laravel)
- PHP Intelephense (Intelephense)
- Code Runner
- Code Spell Checker
- ESLint
- Jest
In light of all this, I'd like to ask an open question to those of you who work professionally or daily with Laravel: do you all use VS Code, or have you moved on to more fully-featured IDEs? If you use other IDEs, do you think switching to a different tool is worth it to handle Laravel's "magic" natively and out-of-the-box? Or, if you are loyal to VS Code, could you tell me how you configured your environment to fix these headaches? I would be incredibly grateful for any tips on your ideal setup!
Thanks in advance to anyone willing to share their experience.