Run Laravel artisan commands in PHP Storm

Published: Jul 2, 2021 by C.S. Rhymes

PHP Storm has a built in terminal window which you can use to run Laravel artisan commands, but there is a quick configuration change that you can do to make it even easier to run artisan commands.

  • Open Preferences > Tools > Command Line Tool Support
  • Click the plus icon
  • Select Laravel from the Choose tools dropdown and press OK

Command line tools

  • Set an alias, I’ve used artisan in this example
  • Choose your PHP Interpreter or use the default project interpreter
  • Set the Path to script as the location of your Laravel app’s artisan file
  • Press OK

Tool Settings

  • Press control twice to open Run Anything
  • Type the alias you entered, artisan in my example, and a list of artisan commands will appear, along with the available options.
  • The list of available commands will filter down as you type
  • Enter the command and press enter and it will run the command for you in the PHP Storm terminal

Run Anywhere

For more information, take a look at the PHP Storm docs website

Photo by Ghost Presenter on StockSnap

PHP Laravel Artisan

Share

Latest Posts

Using when with the Laravel Http Client
Using when with the Laravel Http Client

Here’s a little tip I discovered that I haven’t seen documented anywhere. You can use when() and unless() with the Laravel Http client.

New book announcement!
New book announcement!

Announcing the new book, The Little-Astwick Mysteries - Trouble at the church, by C.S. Rhymes. It is now available for pre-order on the Amazon Kindle store for £2.99, with the release date of the 1st February 2024.

Using prettier to format your Jekyll theme
Using prettier to format your Jekyll theme

I have been using prettier for a few years to automatically format code, especially JavaScript and TypeScript projects, as it helps standardise the output on a shared code project. I have maintained a few different Jekyll themes over the years and wanted to use the power of prettier to automatically format code consistently.

How NOT to make a website

How NOT to make a Website

By C.S. Rhymes

From £2.49

Nigel's Intranet Adventure

Nigel's Intranet Adventure

By C.S. Rhymes

From £2.99