Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmdadl/base
an no-framework mvc tutrial using
https://github.com/ahmdadl/base
Last synced: about 1 month ago
JSON representation
an no-framework mvc tutrial using
- Host: GitHub
- URL: https://github.com/ahmdadl/base
- Owner: ahmdadl
- Created: 2019-08-03T22:07:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T17:36:40.000Z (over 2 years ago)
- Last Synced: 2024-04-30T17:48:38.978Z (8 months ago)
- Language: PHP
- Size: 19.5 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP Simple Framework
#### Learning PHP OOP### Features:
* [Fast Route](https://github.com/nikic/fast-route)
* [Symfony Dependency Injection](https://github.com/symfony/dependency-injection)
* [Plates - Template System](https://github.com/league/plates)
* [Validation](https://github.com/respect/validation)
* [Testing- PhpUnit](https://github.com/phpunit/phpunit)
### Examples:
File: routes/web.php
```php
$r->get('/', ['HomeController@index']);
$r->post(
'/',
[
'PostController@store',
'middlewares' => ['CsrfVerify']
]
);
```
File: src/Controllers/HomeController.php
```php
view = $view;
$this->session = $session;
$this->session->sessStart();
}
}public function index(array $param = [])
{
return $this->view->render('[view_name]', [
'data' => ModelData::all()
]);
}
```
File: resources/views/home.php
```html
layout('layout', ['title' => 'Home Page']);?>
- =$this->e($row->name)?>
=$this->_method('put')?>
=$this->csrf()?>
```
### Composer Scripts
* tsc
> compile typescripts files to public/js/
* composer asset
> compile app.scss to public/app.css
* composer test
> run phpunit tests
* composer test-log
> create phpunit log
* composer test-coverage
> create phpunit coverage