Skip to content

ThomasCollignon/laravel-query-intellij

 
 

Repository files navigation

Laravel Query

Build Version Downloads

Laravel + DataGrip = ♥️

Demo

This plugin provides database integration for Laravel query builder.

Features

  • Schemas, tables, views and columns completion for query builder methods
  • Inspection of unknown database elements
  • Table alias support
  • Table name resolving from model for eloquent builder methods
  • Model relation table name resolving for eloquent builder relation closure methods
  • Text linking with database elements for navigation and refactoring

Future plans

  • Improve schema builder support to read current migration file as well instead of just table from database
  • Add morph columns support for schema builder integration
  • Improve sorting

Prerequisites

Connect your database

See https://www.jetbrains.com/help/phpstorm/connecting-to-a-database.html#connect-to-mysql-database for instructions.

Laravel tools

You also need either Laravel Idea plugin (paid) or Laravel IDE helper added to your project and run

php artisan ide-helper:generate
php artisan ide-helper:meta
php artisan ide-helper:models

which will generate some helper files so your IDE could see Eloquent methods.

Laravel Query plugin needs either of those to work otherwise, it cannot understand for which methods to trigger autocompletion.

Installation

  • Using IDE built-in plugin system:

    Preferences > Plugins > Marketplace > Search for "Laravel Query" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Preferences > Plugins > ⚙️ > Install plugin from disk...


Plugin based on the IntelliJ Platform Plugin Template.

About

🧩 Laravel Query Builder integration for PhpStorm

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 67.5%
  • PHP 32.4%
  • HTML 0.1%