hasMany('App\Reservation'); } public function setPasswordAttribute($value) { if($value) $this->attributes['password'] = bcrypt($value); } public function getRoleListAttribute() { return $this->roles->lists('id')->toArray(); } }