Skip to content
shpontexPublic

About

Send query to your API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

laravelQL (this project is under construction)

Send query to your API

Getting Started

LaravelQL let you send the exact query that you need to your API.
It uses the most popular Laravel query methods.

Example

axios.get("products",{
    params: {
        select: ["name","slug"],
        where:{
            price: 1000
        },
        with: "translations",
        ...
    }
})

Installation

composer install Shpontex\LaravelQL

Parameters

{
    // Get One result
    result: "first"

    // Pluck result
    result: ["pluck",["name","slug"]]

    // Get count
    result: "count"

    // Get max
    result: ["max","price"]
}
{
    select: "name",
    select: ["name","slug"]
}
{
    where:{
        item_id: 30
    }

    where:[
        ["item_id", 30],
        ["price",">=",1500]
    ],

    orWhere:["item_id",20],

    whereNull: "created_at",

    whereNotNull: "price",

    whereColumn:["created_at","updated_at"],

    whereBetween:["price",[2000,2500]],

    whereNotBetween:["price",[1000,1500]],

    whereIn:["id",[1,4,5]]
}
  • orWhere: Array

About

Send query to your API

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages