I have a column in my database called exists
, but when I try to use
$model->exists
Laravel checks if the record exists rater return the value of exists.
Is their any way to tell Laravel not to do this on that particular model?
I have a column in my database called exists
, but when I try to use
$model->exists
Laravel checks if the record exists rater return the value of exists.
Is their any way to tell Laravel not to do this on that particular model?
There's another way to do this as well; set a variable to the name of your field, then access it this way:
$fieldname = 'exists';
$model->$fieldname;