Made by Raeen Ahani in 2021 in Gorgan, Iran
composer create-project raeen/bamboo
To connect to the mysql database, refer to the .env
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
The method sent to the controllers is stored in the $method
( $this->method
) variable
The page address is stored in the $path
( $this->path
) variable on the controllers
The data sent to the api is stored in the controllers in the $data
( $this->data
) variable
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
For the http authorization header, use the auth(username, password)
function in the controllers
Use the apikey(length = 20)
function in the controller to create the api key
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);
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