Automatically Open Files on Artisan “Make” Commands

Automatically Open Files on Artisan “Make” Commands

“Open on Make” is a neat little package by Andrew Huggins that makes it easy to have newly created files open in your editor of choice.

When you run commands like php artisan make:controller, this package will listen for the command and open the file in the editor that you configure.

To configure your command to open in your editor of choice, you can configure the following environment variables, or publish the configuration:

# Optionally set some flags, i.e.

While writing about this, I opened a PR to disable the listener via configuration that was accepted yesterday.

The new open-on-make.enabled configuration option allows you to explicitly disable the package in a given environment, or in cases where a team member cannot use it for whatever reason:


Being able to disable the package will be helpful in a team setting where not everyone might not have the same preferences or if you have some other reason to disable it in a given environment.

To give this package a try in your project, head over to the GitHub repo or install it with composer require --dev ahuggins/open-on-make.

Filed in: Laravel Packages / Artisan


Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Laravel / Vue.JS Developer - Join an amazing team!
JTR Solutions
Mid / Sen. Software Engineer
Clearwater, FL
Remote PHP / Laravel Developer
Senior PHP/Laravel Developer: Your Dream Work Environment
iPhone Photography School
Senior Laravel Developer
Leidseplein, Amsterdam
PHP Developer
Senior Laravel Developer (Canada and India)
London, Ontario, Canada
Factory Bucket Inc.