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

Vuetable-2 data not displaying in the view #8

Open
8cris2 opened this issue Jul 26, 2017 · 9 comments
Open

Vuetable-2 data not displaying in the view #8

8cris2 opened this issue Jul 26, 2017 · 9 comments

Comments

@8cris2
Copy link

8cris2 commented Jul 26, 2017

Hi @ratiw

I am getting this error when the table loads in the view. I currently cannot see any rows being displayed once the view renders. Can you assist please? Thanks in advance

Errors

XMLHttpRequest cannot load http://vuetable.ratiw.net/api/users?sort=&page=1&per_page=5. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5000' is therefore not allowed access.

VM3314:1 XHR failed loading: GET "http://vuetable.ratiw.net/api/users?sort=&page=1&per_page=5".

load-error Error: Network Error

in my template I declare the component with everything that I need.

<vuetable 
  ref="vuetable" 
  :fields="fields" 
  api-url="http://vuetable.ratiw.net/api/users" 
  pagination-path="">
</vuetable>
@8cris2
Copy link
Author

8cris2 commented Jul 26, 2017

I just reviewed this issue issue 41 over here and saw that the link was missing the s for https requests but still after updating it the same issue prevails.

How can I fix this issue. Thanks

@ratiw
Copy link
Owner

ratiw commented Jul 26, 2017

@Gemini12 If you're using Chrome, try force reload to eliminate the cache and see if it fixes your problem.

Normally, this is related to CORS issue.

You can also look at this repo to create your own local endpoint for testing.

@8cris2
Copy link
Author

8cris2 commented Jul 26, 2017

@ratiw Yes I am using Chrome. Will try that and see what happens.

@8cris2
Copy link
Author

8cris2 commented Jul 26, 2017

Hi @ratiw it is a CORS issue and haven't been able to fix this just yet. I saw that I did not have vue-resource installed. So it might be this.

@ratiw
Copy link
Owner

ratiw commented Jul 27, 2017

@Gemini12 Vuetable-2 uses axios instead of vue-resource. I've cloned the repo and everything is still working as expected, so I'm not sure how you've modified the code.

@8cris2
Copy link
Author

8cris2 commented Jul 27, 2017

Hi @ratiw I will have a look at this. Thanks.

@newbie2005
Copy link

I found same issue and looking forward solution

@sathishece
Copy link

login and register not show

@ratiw
Copy link
Owner

ratiw commented Dec 6, 2017

This may no longer work in Laravel 5.5. I can update the project at the moment.

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

4 participants