Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel model undefined property

add the to the function in the model
  eg : you can't access $user->photo then create a function 
  inside user model called getImage() then inside the function write
  return $this->attributes['photo']; 
  then call the $user->getImage() in the controller, 
  everything will work fine
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #model #undefined #property
ADD COMMENT
Topic
Name
7+7 =