Laravel Model attributes in camelCase. Two ways to have it.

In this article, I will talk about how to have camelCase properties in Eloquent models. Let’s see these two ways.

Photo by Isabella Jusková on Unsplash

One of the issues in using models with Eloquent ORM is having the default behavior of all the attributes in snake_case.

Like this for example:

// We import the model class.
use App\Model\Image;