Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cvar1984/slim
Use prototyped framework as you like
https://github.com/cvar1984/slim
architecture papercss skeleton slim-framework symfony twig
Last synced: 29 days ago
JSON representation
Use prototyped framework as you like
- Host: GitHub
- URL: https://github.com/cvar1984/slim
- Owner: Cvar1984
- License: mit
- Created: 2020-06-16T13:46:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-05T15:19:37.000Z (almost 4 years ago)
- Last Synced: 2024-05-01T18:15:38.922Z (7 months ago)
- Topics: architecture, papercss, skeleton, slim-framework, symfony, twig
- Language: PHP
- Homepage:
- Size: 2.6 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Slim 4 skeleton
[![CodeFactor](https://www.codefactor.io/repository/github/cvar1984/slim/badge)](https://www.codefactor.io/repository/github/cvar1984/slim)
![PHP Composer](https://github.com/Cvar1984/slim/workflows/PHP%20Composer/badge.svg?branch=master)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)## install to webroot
clone to your htdocs
```sh
git clone
```
move everything to `/var/www/html (webroot)`then go to `/var/www/html` and install depencies
```sh
composer install --no-dev
yarn install
```
edit `/var/www/html/app/container.php`comment this
```php
// $app->setBasepath();
```
start your webservice like apache or something like
```sh
php -S 127.0.0.1:8080 -t /var/www/html/public
```
## install to webroot/custom
clone to your htdocs
```sh
git clone
```
move everything to `/var/www/html/custom (webroot)`then go to `/var/www/html/custom` and install depencies
```sh
composer install --no-dev
yarn install
```
edit `/var/www/html/app/container.php`
do this
```php
$app->setBasepath('/custom');
```
start your webservice like apache or something like
```sh
php -S 127.0.0.1:8080 -t /var/www/html/custom/public
```
### Public directory
```
public/
|-- assets
| `-- local
| |-- images
| |-- audio
| |-- video
| `-- cache
`-- index.php
```### Where you connect front-end & back-end
```
src/
`-- Controller
|-- BlogController.php
|-- HomeController.php
|-- NotFoundController.php
`-- Middleware -> Local middleware
|-- NotFoundMiddleware.php
`-- DatabaseMiddleware.php
```### Where your setup framework
```
config/
|-- bootstrap.php
|-- container.php
|-- middleware.php
|-- routes.php
`-- settings.php
```### Where front-end do their job
```
templates/
|-- assets
| `-- local
| |-- js
| `-- css
|-- blog.html.twig
|-- footer.html.twig
|-- header.html.twig
`-- home.html.twig
```