Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fintech-systems/packagist-boilerplate
Boilerplate for starting new a Packagist package generally used by Laravel and an API
https://github.com/fintech-systems/packagist-boilerplate
Last synced: about 1 month ago
JSON representation
Boilerplate for starting new a Packagist package generally used by Laravel and an API
- Host: GitHub
- URL: https://github.com/fintech-systems/packagist-boilerplate
- Owner: fintech-systems
- License: mit
- Created: 2021-09-17T14:48:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-03T10:28:00.000Z (over 2 years ago)
- Last Synced: 2023-03-07T06:36:36.509Z (almost 2 years ago)
- Language: PHP
- Size: 76.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Technology API
![GitHub release (latest by date)](https://img.shields.io/github/v/release/fintech-systems/packagist-boilerplate) [![Build Status](https://app.travis-ci.com/fintech-systems/packagist-boilerplate.svg?branch=main)](https://app.travis-ci.com/fintech-systems/packagist-boilerplate) ![GitHub](https://img.shields.io/github/license/fintech-systems/packagist-boilerplate)A Technology API designed to run standalone or part of a Laravel Application
Requirements:
- PHP 8.0
- Technology## Installation
You can install the package via composer:
```bash
composer require :vendor_slug/:package_slug
```# Usage
## Framework Agnostic PHP
```php
load();$server = [
'api_url' => $_ENV['TECHNOLOGY_API_URL'],
'api_key' => $_ENV['TECHNOLOGY_API_KEY'],
'api_secret' => $_ENV['TECHNOLOGY_API_SECRET'],
];$api = new Technology($server);
$result = $api->getInformation();
```## Laravel Installation
You can publish the config file with:
```bash
php artisan vendor:publish --provider="VendorName\Skeleton\SkeletonServiceProvider" --tag=":package_slug-config"
```# Features
## Feature 1
Framework Agnostic PHP:
```php
$newRecord = ['test1', 'test2'];$api = new Technology;
$api->post($test);
```Laravel App:
```php
$newRecord = ['test1', 'test2'];Technology::post($newRecord);
```Expected result:
A new record is added.
## Testing
```bash
vendor/bin/phpunit
```Use the command below to run tests that excludes touching the API:
`vendor/bin/phpunit --exclude-group=live`
The `storage` folder has examples API responses, also used for caching during tests.
### Coverage reports
To regenerate coverage reports:
`XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-html=tests/coverage-report`
See also `.travis.yml`
### Local Editing
For local editing, add this to `composer.json`:
```json
"repositories" : [
{
"type": "path",
"url": "../technology-api"
}
]
```Then in `require` section:
```json
"fintech-systems/technology-api": "dev-main",
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Credits
- [:author_name](https://github.com/:author_username)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.