Video Version of the Lesson
[Only for premium members]
[Only for premium members]
The final thing I want to do in this section about various methods and properties of Eloquent Model structure is to refer you to the official API docs. Only a few people know that, but in addition to the official Laravel documentation, API documentation lists all potential methods, properties, and syntax options.
So if you go to api.laravel.com and look for an example, specifically for Model which is inside of Illuminate/Database/Eloquent
, there's a considerable amount. You can find a lot of hidden gems.
For example, what I haven't shown you in this course, increment(). There are a few methods to increment or decrement some values in your Eloquent Model instead of doing plus one and save or update you just increment or decrement by some amount.
Also, there's an interesting method called...