Disable Laravel’s Eloquent timestamps

I’m in the process of converting one of our web applications from CodeIgniter to Laravel. However at this moment we don’t want to add the updated_at / created_at fields to all of our tables as we have a logging class that does all this in more depth for us already.

I’m aware I can set $timestamps = false; in:

Vendor\laravel\framework\src\illuminate\Datebase\Eloquent\Model.php

However I’d rather not change a core file for Laravel, or have everyone of my models have that at the top. Is there any way to disable this elsewhere for all models?

10 Answers
10

Leave a Comment