Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to auto import laravel class in vs code [closed]

I am currently working on laravel project in visual studio code text editor. If i use laravel package classes in the code at that time i want to automatically import that class using any vs code extension. If you know any best extension for this let me know.

For example I am using Schema class in the code then class should automatically imported like use use Illuminate\Support\Facades\Schema;

like image 787
Senthurkumaran Avatar asked Mar 29 '20 05:03

Senthurkumaran


People also ask

Can I use Vscode for laravel?

Visual Studio Code is an amazing code editor, one of my favorites next to Atom and Sublime Text. Laravel is my favorite when it comes to enterprise PHP development. In this article, let me show you how I have configured Visual Studio Code(vscode from now on) for Laravel development.


2 Answers

Use PHP Intelephense extension by Ben Mewburn for auto importing class name and many more feature. Install from vs code editor or check it here

like image 80
Mahmud hasan Avatar answered Sep 21 '22 15:09

Mahmud hasan


PHP Namespace Resolver extension for VSCode works fine for me.

like image 35
Alfredo Morales Avatar answered Sep 19 '22 15:09

Alfredo Morales