Skip to content

ueman/jetbrains-laravel-make-integration

 
 

Repository files navigation

Laravel Make Integration for the Jetbrains Platform

This package integrates the php artisan make:* commands to the "File > New" menu.

Newfile menu with Laravel group provided by this plugin

Build Version Downloads

Once an action, say File > New > Laravel > Controller is triggered, a dialog pops up, where you can enter the name of the class to be generated. Once you hit enter, the artisan command, here php artisan make:controller, will be executed by your configured php interpreter.

A more detailed description can be is located in the project readme on GitHub

Features

🎯 Helpful guidance

The plugin tries to be helpful, by highlighting appropriate actions, based on where in your project you triggered the action. If you right-click click on the "app/Http" folder, only Controller, Middleware, Resource and Request would be active, so you are not getting overwhelmed by all the other make-commands available.

Only a part of the make-commands are active, as the action was triggered from the Http-folder

Note: You can always trigger the actions from anywhere by using the double-shift/search anything menu and search for the action. In this case, nothing will be filtered out based on your selection in the Project-view.

🤖 Auto filled namespaces

It also pre-fills the namespace for the class to be generated. If you try to generate a new Controller in a A/Deeply/Nested/Namespace/In/Your/Controllers/Folder, the input will already be pre-filled with the right namespace, as you can see in the image below. Now the artisan command to be executed will contain the namespace, so your new class will also be created in the app/Http/Controllers/A/Deeply/Nested/Namespace/In/Your/Controllers/Folder.

The namespace was initially filled, as the action was triggered from a sub-folder of app/Http

🏳️‍🌈 Flags

You can pass every flag that is supported by the artisan sub-command of your choice. Just write all flags after the name of the class you want to generate, and they will be passed along.

A modal with options passed to the make command

🐳 Remote Interpreters

If you are using Docker to run your local development environment, and you have specified path mappings for your project PHP interpreter, everything will just work fine (just make sure you have your path mappings setup). The extension uses the interpreter specified in the project settings, or the first local one it can find, if none is configured.

Because the IDE has to launch a Docker container in the background, which takes some time, you will see a popup like the one below, if you are using a remote interpreter.

A waiting modal, that indicates that the extension connects to a docker container

Supported Commands

  • Cast
  • Channel
  • Command
  • Component
  • Controller
  • Event
  • Exception
  • Factory
  • Job
  • Listener
  • Mail
  • Middleware
  • Migration
  • Model
  • Notification
  • Observer
  • Policy
  • Provider
  • Request
  • Resource
  • Rule
  • Seeder

Installation

  • Using IDE built-in plugin system:

    Preferences > Plugins > Marketplace > Search for "jetbrains-laravel-make-integration" > Install Plugin

  • Manually:

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

Usage notes

This does only work if you have the Laravel project open, the root of your project is the root of your Laravel folder and contains the artisan binary!

Feature requests

If you have an idea for improving this plugin, first take a look at the existing feature requests and then submit an issue through Github.

About

Integrate the php artisan make:* commands to the "File > New" menu

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%