Support the ongoing development of Laravel.io →
posted 4 years ago
Laravel
Last updated 2 years ago.

khawarbajwa liked this thread

1
moderator

By default Laravel expect a created_at and updated_at column in your tables.

You can disable it with public $timestamps = false; on your model, or you can add the columns to your database. In your migration you can do it with: $table->timestamps(); that will generate both columns.

See https://laravel.com/docs/7.x/eloquent#introduction and search for the title Timestamps for more information.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.