Accessor method not call properly in laravel
04:28 09 May 2018

my column name like USERDATA in mysql DB and my user model code look like below.

.....
....

public function getUserDataAttribute($value){

    if($value != null){
      return  $this->directory.$value;
    }
  }

.......
.......

My problem was when i set capital word in db not call accessor method .But I set small letter in DB like userdata. properly call accessor method

How to resolve?

I search many ways but not get any proper solution

php laravel laravel-5 eloquent