Skip to main content
Post Made Community Wiki
Source Link
Prem Patel
  • 301
  • 3
  • 6

Best way to get node URL from node object-

  • Absolute Path : $node->toUrl()->setAbsolute()->toString();
  • Relative Path : $node->toUrl()->toString();

It will also handle node language.