mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
Week 11/2022
This commit is contained in:
parent
4af817e2b0
commit
b451d14953
12 changed files with 135 additions and 1 deletions
15
content/tips/php-traits-can-contain-abstract-methods.md
Normal file
15
content/tips/php-traits-can-contain-abstract-methods.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
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:
|
||||
Loading…
Add table
Add a link
Reference in a new issue