An open API service indexing awesome lists of open source software.

https://github.com/atiksoftware/php-framework-amiral


https://github.com/atiksoftware/php-framework-amiral

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

# PHP Framework ASW Amiral
PHP small and basic rest api framework

Its not MVC. Its CCV.

---

## Installation

### Using Composer

```sh
composer require atiksoftware/php-framework-amiral
```

---

## HOW TO USE
### FILE TREE
```
core
controller (this folder containing your model/class files)
Posts.php
engine (this folder containing your middle function files)
posts
index.php
list.php
delete.php
update.php
users.php
index.php
```

### FILE EXAMPLES
*index.php*
```php
posts->Select();

*core/engine/posts/search.php*
Ex Req. URL: site.com/posts/search?search=deneme&limit=10&skip=8
```php
[]];
$parts = explode(" ",$search);
foreach($parts as $part){
$filter['$and'][] = [
'text' => [
'$regex' => new \MongoDB\BSON\Regex ( $part)
]
];
}

}

$items = $class->posts->Select(
$filter,
["created_time" => -1],
[],
$limit,
$skip
);

$return = array_values($items);
```