安装办法:
1、从Package Control 中搜索Laravel 5 Snippets , https://packagecontrol.io/packages/Laravel%205%20Snippets
2、从github上下载最新版,复制到sublime下的Packages里,
通过git获取最新版,
git clone https://github.com/Lykegenes/laravel-5-snippets.git “Laravel 5 Snippets”
或者 直接下载 https://github.com/Lykegenes/laravel-5-snippets/archive/master.zip
使用方法:
The included snippets are organized in categories following Laravel’s Facades and their documentation; such as Auth::,Config:: and Session::. This way, you can quickly search for wat you’d like to accomplish thanks to Sublime Text fuzzy search.
All the snippets in this package follow the following naming convention :
{category}::{function name}
For example : Auth::check will produce this snippet in your code : Auth::check().
具体用法
Here are the available snippet categories and prefixes :
Prefix | Notes |
---|---|
Auth | |
Blade | Snippets will only show up in Blade files *.blade.php. |
Cache | |
Config | |
Console | |
Cookie | |
Crypt | |
Event | |
Hash | |
Helper | Contains sub-categories : Helper::array, Helper::misc, Helper::path, Helper::strings, andHelper::url; just like in Laravel’s documentation. |
Input | |
Log | |
Redirect | |
Response | |
Route | |
Schema | Contains two sub-categories : Schema:: for snippets related to the database table itself; and Column:: for snippets related to the columns. |
Session | |
Storage | |
View |
Credits
License
The MIT License (MIT). Please see License File for more information.