0.0.1 • Published 11 months ago

@bobanum/vue-model v0.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

@bobanum/vue-model

Vue Model system based on Laravel Models and Queries.

Installation

npm install @bobanum/vue-model

Usage

import Vue from 'vue'
import {Model} from '@bobanum/vue-model'
export default class Task extends Model {
  static get url () {
	return '/api/model'
  }
  static get fields () {
	return {
	  id: {
		type: Number,
		default: null
	  },
	  name: {
		type: String,
		default: null
	  }
	}
  }
}

API call examples

MethodVerbURLDescription
Model.all()GET/api/taskgets all rows

To be continued

0.0.1

11 months ago