laravel-countdown
laravel-countdown copied to clipboard
Facades does not seems to work when used with Laravel 5.5 auto-discovery
Halo
I like to try it, but when i try to run, it's show:
(1/1) ErrorException Non-static method jpmurray\LaravelCountdown\Countdown::from() should not be called statically
Thank you.
I'll be checking that in the coming days. Until then, can you show me the code you are trying to run?
Hello, I have the same problem. This is the code I am trying to run:
public function devuelveTiempoRestante(){ Carbon::setLocale('es'); $fecha_finaliza_todo = Carbon::parse($this->fechaentrega_tarea); $fecha_ahora = Carbon::parse(date('Y-m-d H:i:s')); $countdown = Countdown::from($fecha_ahora) ->to($fecha_finaliza_todo) ->get(); return($countdown->toHuman()); }
Thank you
@diego-mglab Thank you, I'll look at that probably today, if not tomorrow!
@diego-mglab @sluxzer for some reasons, it seems that the auto-loading of the Facade is not working. You would have to include it yourself, like so:
use Facades\jpmurray\LaravelCountdown\Countdown;
That way I could make it work. I'll mark this as a bug to fix, but it's not high in my priorities, especially since we can import the facade ourselves.