mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 13:24:03 +00:00
15 lines
No EOL
488 B
Markdown
15 lines
No EOL
488 B
Markdown
---
|
|
title: 'PHP traits can contain abstract methods'
|
|
tweet_id: '1505269900352258049'
|
|
thread_slug: weekly-thread-2022-11
|
|
author_username: mmartin_joo
|
|
images:
|
|
- 'https://pbs.twimg.com/media/FN-wwBiXMAYfW2D.jpg'
|
|
created_at: 2022-03-19T19:48:05+00:00
|
|
slug: php-traits-can-contain-abstract-methods
|
|
---
|
|
💡Did you know you can write abstract methods in a trait?
|
|
|
|
This way you don't have to make assumptions about the models where the trait is used.
|
|
|
|
But instead, you have a clear contract: |