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,520 points
146 views

1 answer to this question.

0 votes

Hello @kartik,

 You can simply use:

Artisan::output()
answered Dec 2, 2020 by Niroj
• 82,760 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,760 points
1,045 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,760 points
328 views
+1 vote
5 answers

How to get user's IP address in Laravel?

Hey, We can get the user's IP address ...READ MORE

answered Mar 20, 2020 in Laravel by Niroj
• 82,760 points
24,677 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,760 points
4,591 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,760 points
7,876 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,760 points
892 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,760 points
712 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,760 points
8,363 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,760 points
1,570 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,760 points
2,591 views