Is there any way to run Laravel on the command line in interactive mode?

2

In PHP, I know you can run it interactively on the command line, which is through the command php -a . Better still be using the library psysh .

But when it comes to not just running simple tests, but running an application interactively on the command line, is it possible to do this with the Laravel framework?

Do versions 4 or 5 have any features that make this possible? Can you do this for artisan ?

    
asked by anonymous 01.03.2016 / 13:26

1 answer

2

Yes, there is a way that works for both Laravel 4 and Laravel 5 .

Just run php artisan tinker from the command line

Example:

Note : The difference between the commands in Laravel 4 and Laravel 5 is that Laravel 5 uses psysh , which does not use the semicolon at the end of each sentence typed in the command line (and it is better also).

    
01.03.2016 / 14:00