I am Jeremiah Caballero, one of the Development Team Lead of Sun* Philippines. This article will mainly discuss what extensions and configuration you need for Laravel Development.
Bạn đang xem: Visual studio codeOne of the most important tool that a developer should have is a good IDE, I have experienced different kinds of them lượt thích Atom, PhpStorm (by JetBrains), và Sublime Text, but in this year I got khổng lồ know a new IDE that have gotten famous và that is Visual Studio Code. So far it has good features that helped me develop laravel apps efficiently. I will giới thiệu to you what are recommended configurations và extentions for developing Laravel Apps.Extensions
PHP ExtensionsPHP Intellisense
Since Laravel Framework is PHP, this extension is really a big help in writing your code.
Features:CompletionSinature HelpWorkspace Symbol SearchFind All ReferencesGo lớn DefinitionHoverFind all symbolsColumn-accurate error reporting
I will not be discussing more about the features, but if you want you can visit their repository here. But overall this is a recommended extension because it helps you write your code more efficiently.
Laravel Framework ExtensionsLaravel Blade Snippets
When we use Laravel it uses a template engine called blade. Khổng lồ make our VSCode support this engine we need to lớn install the Laravel Blade Snippets.
Features:It provides danh mục of blade directives and automatically writes down the blade directives.
Artisan is one of the best feauture of Laravel Framework. It is where we generate our controllers and models as well. It can bởi vì more but overall it"s very cool feature, but VSCode brings us good news because instead of running on terminal, we can actually automatically run it in our IDE. Let"s have a comparison by running php artisan route:list:
Feature:In Normal Terminal:
It outputs the same but the difference is that in VSCode it is more user friendly. Lượt thích the example above in the IDE you can actually search the routes using a tìm kiếm box provided by the extension.
There is still more artisan commands listed so if you want to try it you can install the extension.
Last, but not the least, I recommend to lớn install the Laravel 5 snippets . Same as Laravel Blade Snippets it provides the list of Laravel 5 classes and automatically writes it down in your code.
If you are creating classes most likely you need to địa chỉ the namespace so that you can access the class object, to vày that you need to lớn manually đầu vào use AcmeClassName và sometimes you need to lớn know where the class is located. This extension that I recommend solves this problem & it"s called PHP Namespace Resolver. It just automatically append the namespace of the class as shown below:
Awhile ago we intalled the Laravel Blade Snippet, what we need to bởi now is to lớn the some configuration enable foramattion for our blade. Open Prefences > Settings tìm kiếm the word Emmet and then look for Edit in settings.json
Look for this codes and enable them by change their value from false to lớn true:
"emmet.triggerExpansionOnTab": true, // enable tab lớn expanse emmet tags"blade.format.enable": true, // if you would lượt thích to enable blade formatConclusionVSCode is a lot of things & it can really make your development easy. Install this Extentions & you và it will improve your development speed.
If you want to lớn install more extension, I suggest first to check documentation and consider if it is necessary in your development.