laravel-gamify
laravel-gamify copied to clipboard
From postaman ok, from webapp error
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
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