Giter Club home page Giter Club logo

laravel-countdown's People

Contributors

consoletvs avatar jpmurray avatar juniorb2ss avatar svenluijten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-countdown's Issues

Get countdown string for humans read

Method to return formatted string for humans read, maybe like:

$countdown->toHuman(string $custom = null); // 18 years, 33 weeks, 2 days, 18 hours, 4 minutes and 35 seconds

Possibility to pass custom string to parse, like:

$countdown->toHuman('{hours} years, {weeks} weeks, {days} days'); // 18 years, 33 weeks, 2 days

php 8

[InvalidArgumentException]
Package jpmurray/laravel-countdown has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version:
- jpmurray/laravel-countdown requires php ^7.0 which does not match your installed version 8.0.8.
- jpmurray/laravel-countdown requires nesbot/carbon ^2.0 but it is not present.
- jpmurray/laravel-countdown requires illuminate/support 6.* || 7.* || 8.* but it is not present.

Method elapsed and until with custom date

Methods elapsed and until can receive custom dates or attributes to compare.

elapsed(string $from, $to = null)

Instead of always compare with now, compare with another date or attribute.

$user->elapsed('created_at', 'updated_at');
or
$user->elapsed('created_at', Carbon::now()->subDays(3));

Show countdown between 2 columns in table

Hi,

How can I show time difference between 2 column?

Explain:

I have discount_date column in my products table and I want to show countdown between updated_at and discount_date .

How do I do that?

PS: I also get

Non-static method jpmurray\LaravelCountdown\Countdown::from() should not be called statically

when i use sample in codes in this package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.