Laravel run artisan command from controller

2024-03-04 05:09:32 Anil Singh Laravel

In this trick you will see how to run artisan command from laravel controller

In routes/web.php


In your Controller

public function runArtisanCommand(){

	\Artisan::call('command:name', ['--option' => 'foo']);

This post is submitted by one of our members. You may submit a new post here.

Related Tricks