Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facades does not seems to work when used with Laravel 5.5 auto-discovery #6

Open
sluxzer opened this issue Aug 19, 2017 · 4 comments
Open

Comments

@sluxzer
Copy link

sluxzer commented Aug 19, 2017

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.

@jpmurray
Copy link
Owner

I'll be checking that in the coming days. Until then, can you show me the code you are trying to run?

@diego-mglab
Copy link

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

@jpmurray
Copy link
Owner

jpmurray commented Sep 7, 2017

@diego-mglab Thank you, I'll look at that probably today, if not tomorrow!

@jpmurray
Copy link
Owner

jpmurray commented Sep 7, 2017

@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.

@jpmurray jpmurray added the bug label Sep 7, 2017
@jpmurray jpmurray changed the title Non-static method jpmurray\LaravelCountdown\Countdown::from() should not be called statically Facades does not seems to work when used with Laravel 5.5 auto-discovery Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants