Courses

Laravel 12 Eloquent: Expert Level

Model API Docs and 3 More Random Methods

You're reading a FREE PREVIEW of a PREMIUM course.
Summary of this lesson:
- Exploring Laravel API documentation
- Understanding hidden Model methods
- Working with increment/decrement operations
- Using quiet save operations

Video Version of the Lesson

[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...

The full lesson is only for Premium Members.
Want to access all 38 video+text lessons of this course? (1 h 34 min)

You also get:

  • 77 courses
  • Premium tutorials
  • Access to repositories
  • Private Discord