Coder Social home page Coder Social logo

bamboo's Introduction

Bamboo

Bamboo is a php api framework . Very easy , simple and light

Made by Raeen Ahani in 2021 in Gorgan, Iran

Latest Stable VersionTotal DownloadsLatest Unstable VersionLicenseMonthly DownloadsDaily Downloadscomposer.lock.gitattributesDependentsSuggesters



Install


composer create-project raeen/bamboo

Documentation


Database

To connect to the mysql database, refer to the .env

Router

We use bramus/router for the router, of course we customized it so that by default in the controller the function of the sent method is executed

Method

The method sent to the controllers is stored in the $method ( $this->method ) variable

Path

The page address is stored in the $path ( $this->path ) variable on the controllers

Data

The data sent to the api is stored in the controllers in the $data ( $this->data ) variable

File

The information of the files is stored in the $files ( $this->files ) variable in the controllers

The files are downloaded in the archive folder. To download, use the download(key of file , save File name = null)function in the controllers.

Use the sendFile(file name) function on the controllers to send the file

Authenticate

For the http authorization header, use the auth(username, password) function in the controllers

Api Key

Use the apikey(length = 20) function in the controller to create the api key

Query

Use the DB::query(sql query, parameters ...) function for SQL query on controllers. This function uses pdo , example :

$query = DB::query("SELECT * FROM user WHERE name=?", $name);

$result = $query->fetch(PDO::FETCH_OBJ);

Render

Use render(int $code, array | object $data = null, $status = null, $message = null) on the controllers to send the result as jason. Messages and statuses are completed by code by default

bamboo's People

Contributors

raeen123 avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.