https://github.com/thiiagoms/student-cli
Little application with PHP, PDO and MySQL to run in CLI mode :robot:
https://github.com/thiiagoms/student-cli
php-cli php-cli-script php-pdo php-pdo-mysql
Last synced: 6 months ago
JSON representation
Little application with PHP, PDO and MySQL to run in CLI mode :robot:
- Host: GitHub
- URL: https://github.com/thiiagoms/student-cli
- Owner: thiiagoms
- License: 0bsd
- Created: 2021-12-04T05:07:17.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-05T16:56:15.000Z (about 4 years ago)
- Last Synced: 2025-03-05T22:44:31.222Z (11 months ago)
- Topics: php-cli, php-cli-script, php-pdo, php-pdo-mysql
- Language: PHP
- Homepage:
- Size: 86.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CLI crud :student:
Example of CLI crud, just for educational purposes!
- [Dependencies](#Dependencies)
- [Install](#Install)
- [Run](#Run)
### Dependencies
- PHP +7.4
- Composer
### Install
- Generate autoload with composer:
```bash
$ composer install
```
- Copy `.env.example` to `.env`:
```bash
$ cp .env.example .env
```
- Add your MySQL credentials in `.env` like:
```bash
# Database credentials
DATABASE_HOST=localhost
DATABASE_PORT=3306
DATABASE_NAME=std
DATABASE_USER=root
DATABASE_PASS=toor
```
#### Run
Run the script with
```php
$ php app.php
██████╗ ██╗ █████╗ ███████╗███████╗
██╔════╝██║ ██╔══██╗██╔════╝██╔════╝
██║ ██║ ███████║███████╗███████╗
██║ ██║ ██╔══██║╚════██║╚════██║
╚██████╗███████╗██║ ██║███████║███████║
╚═════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝
[*] Author: Thiago thiiagoms
[*] Description: Little CLI crud
[*] Version: 1.0
=> For get help use: --help | -h
$ php app.php --help
```
- If you want help, run:
```bash
$ php app.php --help
```