Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Tag's attributes as a property #56

Open
glenncoppens opened this issue Sep 7, 2023 · 1 comment
Open

Get Tag's attributes as a property #56

glenncoppens opened this issue Sep 7, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@glenncoppens
Copy link

Is your feature request related to a problem? Please describe.
Get the current value of a tags property. Eg, I wanted to get the current title that was set, as a string. But I had to do something like Meta::getTitle()->toArray()['content'] to get the string value.

Describe the solution you'd like
Can we leverage PHP's magic methods on the base Tag to get the value of a tag's attribute as a property? Like Meta::getTitle()->content (I know title is a special implementation, so maybe not the best example though)

Describe alternatives you've considered
See above

@butschster butschster self-assigned this Sep 10, 2023
@butschster butschster added the enhancement New feature or request label Sep 10, 2023
butschster added a commit that referenced this issue Sep 10, 2023
- Updates PHP up to 8.0
- Adds github workflow to run unit tests
- Removes redundant phpdocs

fixes #56
@butschster
Copy link
Owner

butschster commented Sep 10, 2023

HI, @glenncoppens
Could you try a new version https://github.com/butschster/LaravelMetaTags/releases/tag/v3.0-beta1 ?
Here you can find additional methods like

Meta::getTitle()->getTitle();

@butschster butschster added this to the 3.0 milestone Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants