Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find line that is causing the error

Tags:

laravel

I have just started using Laravel and cannot get my head around how it throws errors. It doesn't show the line where the error is so I don't know how to locate it. Can anyone help?

htmlentities() expects parameter 1 to be string, array given (View: M:\webserver\www\app\views\products\admin\create.blade.php)

This file is incredibly long and I cannot see where this array is being sent.

It's obviously coming from a Form::text() but I am passing a null as the second param in all that I can see. Why doesn't Laravel simply tell me the line that is erroring. The error it puts out is no use to me.

like image 414
Iglo Avatar asked Jun 20 '14 19:06

Iglo


1 Answers

check the error file:

app/storage/logs/laravel.log

you can watch changes in the file (on Mac and *NIX) using command line:

tail -f app/storage/logs/laravel.log

remember that the storage directory must be writable by the webserver/PHP process because it's used as scratch space (for blade views, logs, etc.)

like image 60
Carbon Avatar answered Oct 04 '22 21:10

Carbon