If you have an existing table in the database and you are working with the Laravel Migration system. Here is how you can add a new migration to add timestamps field i.e. created_at and updated_at fields to the table.

Run the following command to generate a new migration file.

This will create a new file named add_timestamps_to_transactions_table prepend by the current timestamp to the database > migrations folder.

Note : All the existing records in the database will be updated with the current timestamp in the created_at and updated_at columns.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners