Laravel Tutorials

Using Laravel Envoy for common local development tasks

Published

When I am developing locally I run a lot of Artisan commands on my VM and I have a memory like Dory (from Nemo). I can never remember the commands I need to run without looking.

So what I have done is setup Envoy with common tasks I run on my VM. Here is a quick example of my reset:

@servers(['vm' => '-p 2222 vagrant@127.0.0.1'])
 
@macro('reset')
migrate_reset
migrate_seed
reload_elastic
@endmacro
 
@task('migrate_reset', ['on' => 'vm'])
cd ~/Code/MyApp
php artisan migrate:reset --env=local
@endtask
 
@task('migrate_seed', ['on' => 'vm'])
cd ~/Code/MyApp
php artisan migrate --seed --env=local
@endtask

Of course the opportunities are limitless for this and I’m really enjoying it.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
Laravel Auditor Audits Your App With Your Own AI Agent image

Laravel Auditor Audits Your App With Your Own AI Agent

Read article
A simple form builder that stays out of your way image

A simple form builder that stays out of your way

Read article
Laravel AI: Trace Agent Runs With Lifecycle Events image

Laravel AI: Trace Agent Runs With Lifecycle Events

Read article
Laravel AI: Get Raw HTTP Responses and Rate Limits image

Laravel AI: Get Raw HTTP Responses and Rate Limits

Read article
Agent Run Observability in Laravel AI SDK 0.11 image

Agent Run Observability in Laravel AI SDK 0.11

Read article
Debounced Queued Event Listeners in Laravel image

Debounced Queued Event Listeners in Laravel

Read article