Question: I have a scenario, where I need some help working with RecyclerView. The workflow is as follows:

* The user taps on a TextView in RecyclerView adapter and on click, i
enable a button in Activity which was disabled earlier.
* On click on this enabled button, I want to change color of that particular position which was tapped.

Now what I have is an interface which provides the position on click of the TextView. What I really want to do is to have a function similar to this in my adapter:

```
public void changeColor(int position){
  //change background color of position
}

```

which then I can call from the activity `adapter.changeColor(position)`.

Can someone explain if this is possible or what can be the other ways to achieve this.

Answer: 
I assume that the code inside accessors and mutators you've shown is working. But you're using the wrong names. Rename these mutators and accessors:

```
setIssue_DateAttribute
setDue_DateAttribute
getIssue_DateAttribute
getDue_DateAttribute

```

To:

```
setIssueDateAttribute
setDueDateAttribute
getIssueDateAttribute
getDueDateAttribute

```
I hope I got your question right: you want to store the issue\_date and due\_date as strings instead of timestamp in the database?

You are casting issue\_date and due\_date as timestamps via the `protected $dates` array in your model. I think you should leave that off if you just want to store dates as a string the DB. 

For example:
Your DB then contains issue\_date as '2018-06-01' which you can convert to a timestamp using Carbon when needed. 

However, I would always store dates as a timestamp and convert them to string in my application when needed.