spatie/laravel-url-signer

Methode validate seems not to be tatic

meyer59 opened this issue · 2 comments

Hi i've got this error where trying to validate url through UrlSigner::validate("url...")

Non-static method Spatie\UrlSigner\UrlSigner::validate() cannot be called statically, assuming $this from incompatible context

Any help would be greatly appreciated, Thanks

The method should be called on the class' facade, not the actual instance.

use UrlSigner;
// instead of `use Spatie\UrlSigner\UrlSigner`

UrlSigner::validate("url...");

This tripped me up, and also #22 — would you mind putting this explanation into the README?