Laravel run artisan command from controller

2022-06-29 22:15:40 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