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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners