V
V
vasIvas2015-12-28 23:18:41
ubuntu
vasIvas, 2015-12-28 23:18:41

How to display the results of the php code in the console?

I am using laravel, ubuntu OS, how can i see the results of executing the code in the console?
I want it to be like in js, I wrote something like console.log(...); only the output is not in the browser console, but in the system console.
Explain in detail how to do this.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
D', 2015-12-28
@vasIvas

Write to the log:
Listen to the logs in the console:
$ tail -f storage/logs/laravel.log (или по дням)

S
svd71, 2015-12-28
@svd71

D' Normalization prompted a sensible thing. Only sometimes you only want to see your own lines. You can, of course, start each line with certain characters and scrape the text. And you can organize a file and write your messages to this file.

A
Andrey Filatov, 2015-12-29
@wendel

https://laravel.com/docs/5.2/artisan#command-io in my opinion everything is described here, there are functions inside the command like $this->info() that display a message directly during execution.

Writing Output
To send output to the console, use the line, info, comment, question and error methods.

$this->line(), $this->info(), $this->comment()...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question