get class name from eloquent laravel code example
Example 1: laravel get class name
$myObject = $em->find(ContactRelation::class, $userId);
echo get_class($myObject);
// Some\Name\Space\Domain\Identity\ContactRelation
Example 2: class name laravel
// laravel helper:
$baseClass = class_basename(App\Models\User::class);
// User