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 20:50:56 +02:00

11 lines
No EOL
541 B
Markdown

---
title: 'Implement the __toString() method in a class to specify custom logic for converting its instances to strings'
tweet_id: '1454133805745385473'
thread_slug: weekly-thread-2021-43
author_username: enunomaduro
images:
- 'https://pbs.twimg.com/media/FCx22U5WQAYOWi4.jpg'
created_at: 2021-10-29T17:11:30+00:00
slug: 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. ✅