- Laravel Application Development Cookbook
- Terry Matula
- 228字
- 2021-07-23 15:33:32
Using Laravel with Sublime Text 2
One of the most popular text editors used for coding is Sublime Text. Sublime has many features that make coding fun, and with plugins, we can add in Laravel-specific features to help with our app.
Getting ready
Sublime Text 2 is a popular code editor that is very extensible and makes writing code effortless. An evaluation version can be downloaded from http://www.sublimetext.com/2.
We also need to have the Package Control package installed and enabled in Sublime, and that can be found at http://wbond.net/sublime_packages/package_control/installation.
How to do it...
For this recipe, follow these steps:
- In your menu bar, go to Preferences then Package Control:
- Choose Install Package:
- Search for
laravel
to see the listing. Choose Laravel 4 Snippets and let it install. After it's complete, choose Laravel-Blade and install it.
How it works...
The Laravel snippets in Sublime Text 2 greatly simplify writing common code, and it includes pretty much everything we'll need for application development. For example, when creating a route, simply start typing Route
and a list will pop up allowing us to choose which route we want, which then automatically completes the rest of the code we need.
There's more...
Installing the Laravel-Blade package is helpful if we use the Blade template system that comes with Laravel. It recognizes Blade code in the files and will automatically highlight the syntax.