Get "PHP 8 in a Nuthshell" (Now with PHP 8.4)
Amit Merchant

Amit Merchant

A blog on PHP, JavaScript, and more

Temporarily disable timestamps in Laravel

Here’s how you can temporarily disable timestamps (created_at and updated_at fieldss) in Laravel.

$post = Post::find(1);
$post->timestamps = false;
$post->title = 'New Title';
$post->save();

Was that useful? Consider leaving a

Tip

👋 Hi there! I'm Amit. I write articles about all things web development. You can become a sponsor on my blog to help me continue my writing journey and get your brand in front of thousands of eyes.

Comments?