fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
429 stars 294 forks source link

Getting title of current page #4894

Closed bwong789 closed 8 months ago

bwong789 commented 9 months ago

Is there a way for a PHP function to obtain the name of the current page?

fisharebest commented 9 months ago

What do you mean "name of the current page"? The <title> element? The URL? Something else?

fisharebest commented 8 months ago

You can obtain a Route object from the current request using Validator::attributes($request)->route().

If you want something else, please ask again with more details