Black Friday sale is now on! 50% off Laravel: The Modular Way. Learn more

Get the last day of the month from a date

David Carr

Tutorials PHP & MySQL Laravel Framework

    To get the last day of the month use date('t'):

    $dueDate = date('t/m/Y', strtotime($row->created_at));

    or with Carbon (Laravel example)



    Laravel Modules Book by David Carr

    Help support the blog so that I can continue creating new content!

    Subscribe to my newsletter

    Subscribe and get my books and product announcements.

    © 2009 - 2022 DC Blog. All code MIT license. All rights reserved.