Installation

This documentation still in development.
If you are using Nuxt or Vue , please follow their installation steps instead of this one.

Add @eloqjs/collection dependency to your project:

yarn add @eloqjs/collection
npm install @eloqjs/collection

Set up on src/main.js:

src/main.js
import { Collection } from '@eloqjs/collection'

Collection.config = {
  // Options
}

Frameworks

Nuxt

Add @eloqjs/nuxt-collection dependency to your project:

yarn add @eloqjs/nuxt-collection
npm install @eloqjs/nuxt-collection

Then, add @eloqjs/nuxt-collection to the modules section of nuxt.config.js:

nuxt.config.js
{
  modules: [
    '@eloqjs/nuxt-collection',

    collection: {
      // Options
    }
  ]
}

TypeScript

Add the types to your "types" array in tsconfig.json after the @nuxt/types (Nuxt 2.9.0+) or @nuxt/vue-app entry.

tsconfig.json
{
  "compilerOptions": {
    "types": [
      "@nuxt/types",
      "@eloqjs/nuxt-collection"
    ]
  }
}

Vue

Add @eloqjs/vue-collection dependency to your project:

yarn add @eloqjs/vue-collection
npm install @eloqjs/vue-collection

Set up on src/main.js

src/main.js
import vue from 'vue'
import Collection from '@eloqjs/vue-collection'

Vue.use(Collection, {
  // Options
})