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

Documentation for adding own api calls #144

Open
nickngqs opened this issue May 10, 2020 · 1 comment
Open

Documentation for adding own api calls #144

nickngqs opened this issue May 10, 2020 · 1 comment

Comments

@nickngqs
Copy link

nickngqs commented May 10, 2020

Currently, the documentation doesn't show how to do that. It can be quite confusing, since the demo uses laravel. Since the demo is a monolithic application, I'm assuming /task means something like this ${baseURL}/task will work. So for apps that split front end and back end, does this mean I should put save: '${serverURL}/task' ?

In demo/resources/assets/models/Task.js

routes() {
	return {
		save:   '/task',
		delete: '/task/{id}',
		update: '/task/{id}'
	}
}

And how do I inject axios instance properties also? I was looking for elegant, structured way and came across vue-mc. Maybe, it's written in the documentation, but I can't seems to find it.

I think it will benefit a lot of people, if vue-mc have better documentation.

@alvaro-canepa
Copy link

By the way, in doc said "Expected but optional route keys are fetch, save, and delete."
But sourcing the code, I found all the keys (fetch, save, update, create, patch, delete).

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