php use model in classname code example
Example 1: php get class name of this
get_class($this);
Example 2: laravel get class name
$myObject = $em->find(ContactRelation::class, $userId);
echo get_class($myObject);
// Some\Name\Space\Domain\Identity\ContactRelation