I am using Laravel and I need to create an attribute (is_me) in the model to know if the current profile belongs to the user that is logged in;
I was doing as below, but now that I'm using API I can no longer use Auth :: user ()
public function getIsMeAttribute(){
return \Auth::user()->id == $this->id;
}