How to get response from Artisan call

0 votes
When I run in terminal php artisan migrate this results in 'Nothing to migrate' when indeed there is nothing to migrate.

When I use Artisan::call('migrate') in code (use this in a custom Artisan command) this doesn't return any message. It just executes the code without any feedback.

If I vardump() the result of the Artisan::call method it just returns an int(0)

Is it possible to get the response of the Artisan call method?
Dec 2, 2020 in Laravel by kartik
• 37,490 points
69 views

1 answer to this question.

0 votes

Hello @kartik,

 You can simply use:

Artisan::output()
answered Dec 2, 2020 by Niroj
• 82,580 points

Related Questions In Laravel

0 votes
1 answer

How to get image from resources in Laravel?

Hello @kartik, You can make a route specifically ...READ MORE

answered Oct 28, 2020 in Laravel by Niroj
• 82,580 points
200 views
0 votes
1 answer

How to identify wheather the request is HTTP GET or HTTP POST in Laravel?

Hey, In order to identify the type of ...READ MORE

answered Mar 19, 2020 in Laravel by Niroj
• 82,580 points
215 views
0 votes
5 answers

How to get user's IP address in Laravel?

Looking at the Laravel API: Request::ip(); Internally, it uses the getClientIps the ...READ MORE

answered Dec 15, 2020 in Laravel by Roshni
• 10,420 points
17,567 views
0 votes
1 answer

How to set port for php artisan.php serve in Laravel?

Hii @kartik, When we use the php artisan serve ...READ MORE

answered Mar 30, 2020 in Laravel by Niroj
• 82,580 points
3,216 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,580 points
5,638 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

answered Mar 18, 2020 in Laravel by Niroj
• 82,580 points
652 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,580 points
497 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

answered Mar 23, 2020 in Laravel by Niroj
• 82,580 points
6,217 views
0 votes
1 answer

How to get data from Laravel backend and display in Vue/Nuxt frontend

Hello, You have to use the package dotenv. Then ...READ MORE

answered Apr 8, 2020 in Laravel by Niroj
• 82,580 points
1,310 views
0 votes
1 answer

How To Pass GET Parameters To Laravel From With GET Method ?

Hello @kartik, The simplest way is just to ...READ MORE

answered Sep 24, 2020 in Laravel by Niroj
• 82,580 points
1,353 views