Giter Site home page Giter Site logo

flyzjhz / thinkphp5-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fw6669998/thinkphp5-plugin

0.0 2.0 0.0 5.33 MB

phpstorm插件,用于thinkphp5框架的视图,配置,路由,数据库,模型智能提示和跳转

License: MIT License

Java 100.00%

thinkphp5-plugin's Introduction

thinkPhp5 plugin

概览

基于Haehnchen/idea-php-laravel-plugin

用于thinkphp5.0的视图,配置,路由,数据库,模型智能提示和跳转(快捷键Ctrl+B或者Ctrl+click), 及模型函数(model)返回类型分析

安装

在线安装: 在phpstorm的插件中心(File->Setting->Plugins), 搜索thinkphp5 plugin安装

离线安装: 下载release文件或者根目录下的plugin.zip, 在phpstorm的插件中心,点击install plugin from disk,选择下载文件安装

使用

配置

提示方法config(),Config::get(),Config::set(),
扫描/config和/application目录下的配置文件进行提示, 可跳转到配置文件源位置

img

视图

提示方法$this->fetch(), view(),
可跳转到页面(html)位置

img

路由

使用Route::get/post/put/delete/any在任何位置提示, 
使用return ['test' => ['in', ['method' => 'post']]]格式,在application和config目录下文件名带有route的文件中进行提示

img

模型

提示方法model(),Loader::model(),
使用model()方法会对分析返回值类型进行赋给变量,最终类型为实际模型类型,而不是Model类型

img

数据库

配置phpstorm数据库连接

首先配置请数据库连接,如果不会请点击上面的衔接

提示衔接:
如果只有一条数据库连接,则该数据库为提示连接, 
如果有多条连接将需要提示的数据库连接命名为包含work的命名的连接, //重命名连接, 连接->右键->rename
 
数据库会在方法的代码中收集表进行字段提示,
以数据表相关的方法会进行表提示, 以数据库字段相关的方法会进行字段提示, 以$where和$field为开头的数组变量会进行字段提示

img

常见异常

如果模型,配置,和路由不能正常提示和跳转, 请点击File -> invalidate caches/restart

联系方式

邮箱: [email protected]

thinkphp5-plugin's People

Contributors

fw6669998 avatar

Watchers

James Cloos avatar feixiang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.