I want to log from within a Laravel blade template. Can I log something using the Laravel logger, or a simple syslog(1, 'my message')
would even be better.
All tips are welcome!
You can use logger in blade
{{ logger('Test') }}
You can use laravel helper function
for store information on log use info
function
{{ info("print log in blade")}}
for debug level message on log use logger
function
Don't add semi colon in the logger function.
//{{ logger('Debug message'); }}
{{ logger('Debug message') }}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With