17 Laravel Eloquent Tips and Tricks

17 Laravel Eloquent Tips and Tricks

Mar 19, 2022

According to Laravel, Eloquent is an object-relational mapper (ORM) that makes it enjoyable to interact with your database. When using Eloquent, each database table has a corresponding “Model” that is used to interact with that table. In addition to retrieving records from the database table, Eloquent models allow you to insert, update, and delete records from the table as well.


In this article, we will learn about Laravel eloquent tips and tricks.

Never update column

In laravel, we can set the column to never update after the initial creation. For this, we need to use mutator on model.

https://kodementor.com/17-laravel-eloquent-tips-and-tricks/

Enjoy this post?

Buy Vijay Kumar Rana a coffee

More from Vijay Kumar Rana