qcod / laravel-gamify

Gamify your Laravel app with Reputation Points & Achievements Badges support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

From postaman ok, from webapp error

SergioGMR opened this issue · comments

Hi!
I'm trying to give points to an user first time after registered.
givePoint(new UserRegistered($user));
it work from postman but not from my webapp.
Any idea?

I guess you are making an ajax request from your webapp, can you check in browser console for CORS header 'Access-Control-Allow-Origin' missing

if yes then you need to install https://github.com/spatie/laravel-cors to enable cors request

image
I think I have this ok, the question is:
All the logic on my controller it's working but not the function givePoint(new EveryFivePickups($recogida)) as an example, but addPoint($points = 10) works.

Thanks so much