vue-mc icon indicating copy to clipboard operation
vue-mc copied to clipboard

Documentation for adding own api calls

Open nickngqs opened this issue 4 years ago • 1 comments

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.

nickngqs avatar May 10 '20 05:05 nickngqs

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).

alvaro-canepa avatar Oct 21 '20 11:10 alvaro-canepa