Under the hood: How database transactions work in Laravel

Continuing the under the hood series, this time about database transactions in Laravel. I won’t repeat all the things on how you can use the transactions in Laravel. If you are not familiar with the topic you can find everything in the documentation here. We’re now focusing on how these implementations work in the background, …

Under the hood: How model attributes work in Laravel

Laravel model attributes are basically representing the database fields for the given model. When data is retrieved from the database, it can be accessed through the model as they were actual properties of the model instance: $model->database_column_name. However the attributes are not real properties of the instance, but they are stored in the protected $attributes …