post_date_gmt; // get the timestamp echo $timestamp; ?>
created_at->getTimestamp(); // get the timestamp echo $timestamp; ?>In this example, we first use the use statement to import the Article model in Laravel. Then, we use the find method to get the article object by its ID. After that, we use the created_at property to get the timestamp of the article and call the getTimestamp method on it to convert it to Unix timestamp. Finally, we print the timestamp using the echo statement. Package/Library: Laravel Eloquent ORM