https://github.com/atiksoftware/php-framework-amiral
https://github.com/atiksoftware/php-framework-amiral
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/atiksoftware/php-framework-amiral
- Owner: atiksoftware
- Created: 2018-12-12T14:22:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-12T16:55:03.000Z (over 7 years ago)
- Last Synced: 2025-01-16T00:56:25.747Z (over 1 year ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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);
```