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

https://github.com/sensorario/wheel-basic-app


https://github.com/sensorario/wheel-basic-app

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

# Install

```bash
prompt> composer create-project sensorario/wheel-basic-app --prefer-dist
prompt> php -S localhost:8666 -t web
```

# Wheel basic application

```bash
├── app
│   └── config
│   └── config.db.php
├── src
│   └── MyApi
│   ├── Components
│   │   └── Config.php
│   └── Controllers
│   └── DefaultController.php
├── web
│   └── index.php
├── composer.json
├── composer.lock
└── readme.md
```

## Controller

```php
'welcome',
];

return $response;
}
}
```

## Create new routes

```php
array(
=> array(
'controller' => ,
=> array(
'action' =>
)
)
),

)[$key];
}
}
```

If you want to add new json endpoint to show developer information:

```php
'/devel/info' => array(
'controller' => 'Vendor\\Controllers\\DevelController',
'GET' => array(
'action' => 'show'
)
)
```

## Database

app/config/config.db.php

```php
'pdo_mysql',
'dbname' => 'my_api',
'user' => 'root',
'password' => '',
);
```