16
Jan
2018

Carbon & Moment.js

16 Jan 2018
    //  check if expired
    Carbon::parse($createdAt)->addSeconds($this->expires)->isPast();


    // diff in seconds
    $then = Carbon::now()->addMinute();
    $now = Carbon::now();
    
    $then->diffInSeconds($now, false) // -60
    $now->diffInSeconds($then, false) // 60