我上架了一个 Laravel 的 代码提示 PHPstorm 插件
在 PHPstorm
插件市场里搜索 Laravel
,标题是 Live Templates For Laravel
。
安装后重启一下就能在设置里的 Editor
-> Live Templates
中查看所有提示。
如果觉得提示有问题或者增加提示,可以联系我,我加进来。
提示文件分三类,分别是 Laravel-Php
,Laravel-Collection
:集合的一些方法比较难记的单词,比如分页,Laravel-Blade
:模板闭合,比如 @if @endif。
例子:
func => function() {
}funcq => function($q) {
$q->where();
}geta => public function getAttribute() {
return ;
}dbbegin => try {
DB::beginTransaction();DB::commit();
return ;
} catch (\Exception $e) {
DB::rollBack();
return ;
}whereq => where(function ($q) {
$q->where();
})when => when($request->, function ($q, $v) {
$q->where(‘’, );
})@if => @if
@endif
更多提示可以在代码中或者下载插件后查看
不简单介绍一下,具体哪些提示啥的吗?
挺不错的