1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00
laravel-tips/content/tips/implement-the-tostring-method-in-a-class-to-specify-custom-logic-for-converting-its-instances-to-strings.md
2021-10-29 19:24:25 +02:00

541 B

title tweet_id thread_slug author_username images created_at slug
Implement the __toString() method in a class to specify custom logic for converting its instances to strings 1454133805745385473 weekly-thread-2021-44 enunomaduro
https://pbs.twimg.com/media/FCx22U5WQAYOWi4.jpg
2021-10-29T17:11:30+00:00 implement-the-tostring-method-in-a-class-to-specify-custom-logic-for-converting-its-instances-to-strings

PHP reminder: you can use the method "__toString()" to specify the string representation of an object.