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

Asked

Viewed 353 times

2

In PHP, I know it is possible to rotate it interactively on the command line, which is via the command php -a. Even better would be using the library psysh.

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

Do versions 4 or 5 have any features that make this possible? You can do this by artisan?

1 answer

2


Yes, there is a way that works both for the Laravel 4 as to the Laravel 5.

Just run php artisan tinker at the command line

Example:

inserir a descrição da imagem aqui

Note: The difference between commands on Laravel 4 and Laravel 5 is that the no Laravel 5 used the psysh, which dispenses with the use of the semicolon at the end of each sentence typed in the command line (and is better also).

  • It failed to explain that Laravel himself uses psysh and Laravel 4 uses another guy... who does not limit the difference only of the point and comma that you commented.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.