DEV Community

Discussion on: Laravel: Update Actions Simplified

Collapse
 
usernotnull profile image
John F

Unfortunately, using the traits as such is now deprecated, see
wiki.php.net/rfc/deprecations_php_...

Calling static trait member directly is deprecated. It should only be accessed on a class using the trait.

Collapse
 
jackmiras profile image
Jack Miras

@usernotnull Thanks for letting me know, I'll figure an alternative for the implementation presented at this post and when I find it, I let you know through the comments.

Collapse
 
jackmiras profile image
Jack Miras • Edited

@usernotnull I've figured an alternative to the problem, the Trait has now a model() function that returns the model instance without the usage of the static:: call.

As you may notice, I've added some extra information into the post because I've noticed that some things changed in the framework and a some information was missing in this post.

If you have anything to add from the previous or the current version of the post, please, let me know.