It is quite convenient to see all logs in the console (php artisan serve) when developing, like Rails.
Lavarel seems dont follow this way, the output in the console is not the logs.
Could anyone please tell what is the elegant way to print something in the development console.
Any help will be highly appreciated!
Easiest way is through console commands, as described here: http://laravel.com/docs/5.1/artisan#writing-output
I know my answer is a bit short on details, but the documentation there is so good, you should be easily up and running with its guidance :)
@mikebronner, thanks a lot for your reply.
Maybe I am wrong, but I think the http://laravel.com/docs/5.1/artisan#writing-output is for Artisan Command, not for my situation.
When writing a Command which need to output something in the console while its executing, the above document helps, but I am not writing a Command, I want output something in controller, model or anywhere in the project.
@screwtape_mk we now have php artisan dump-server This runs a dump server in the console and captures anything you dump() on the console instead of going to the browser
@tekknow you seem to be confused regarding the browser console. That is for Javascript. This talks about dumping data to the shell from where you started your server (artisan serve). If you are having issues consider creating a new tread describing your problem and what you are trying to do