You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We avoid the fatal error in Laravel by having the Model as an abstract class inbetween the implementation and the trait, but that "feels" like a risky workaround that is not supposed to work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Public $timestamps = false is used to disable timestamps in model implementations, however doing this triggers a warning in PhpStorm that is related to this restriction in PHP.
https://www.php.net/traits#language.oop5.interfaces.examples.ex1
We avoid the fatal error in Laravel by having the Model as an abstract class inbetween the implementation and the trait, but that "feels" like a risky workaround that is not supposed to work.
What do you think about this?
Files:
https://github.com/laravel/framework/blob/8.x/src/Illuminate/Database/Eloquent/Model.php
https://github.com/laravel/framework/blob/8.x/src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php
Beta Was this translation helpful? Give feedback.
All reactions