R
R
Roman2019-04-23 17:12:39
Laravel
Roman, 2019-04-23 17:12:39

How can I test pieces of Laravel code from the command line, without a browser?

Hello.
Tell me, is it possible to somehow debug individual blocks of code from the console without resorting to the help of a browser [and router]?
Well, for example, I want to test some function that generates data and adds it to the database. And I want to do it not like this:
https://site.com/testcontroller
but somehow like this:
$ ~/laravel/utils php testcontroller.php
But in this case, it’s completely incomprehensible to me how all these inheritances and dependencies, etc. organize how to connect classes?
Or maybe there are other solutions?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NubasLol, 2019-04-23
@procode

php artisan tinker

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question