get_last_segment()

public function get_last_segment(): string

The get_last_segment() method is supported by a dedicated helper function. For guidance on how to use it, click here.