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

From postaman ok, from webapp error #41

Open
SergioGMR opened this issue Nov 9, 2020 · 2 comments
Open

From postaman ok, from webapp error #41

SergioGMR opened this issue Nov 9, 2020 · 2 comments

Comments

@SergioGMR
Copy link

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?

@saqueib
Copy link
Member

saqueib commented Nov 10, 2020

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

@SergioGMR
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants