Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inmanturbo/path-router
https://github.com/inmanturbo/path-router
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/inmanturbo/path-router
- Owner: inmanturbo
- License: mit
- Created: 2023-08-10T19:09:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-24T20:06:21.000Z (4 months ago)
- Last Synced: 2024-09-25T16:14:58.967Z (about 1 month ago)
- Language: PHP
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# This is my package path-router
[![Latest Version on Packagist](https://img.shields.io/packagist/v/inmanturbo/path-router.svg?style=flat-square)](https://packagist.org/packages/inmanturbo/path-router)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/inmanturbo/path-router/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/inmanturbo/path-router/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/inmanturbo/path-router/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/inmanturbo/path-router/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/inmanturbo/path-router.svg?style=flat-square)](https://packagist.org/packages/inmanturbo/path-router)## Installation
You can install the package via composer:
```bash
composer require inmanturbo/path-router
``````bash
php artisan vendor:publish --tag="path-router-config"
```This is the contents of the published config file:
```php
return [
'active' => env('PATH_ROUTER_ACTIVE', true),
'routes' => [
[
'route_prefix' => 'view',
'active' => env('PATH_ROUTER_ACTIVE', true),
'root_dir' => 'www',
'middleware' => [
// 'web',
// 'auth',
],
'headers' => ['pdf' => [
'Content-Type' => 'application/pdf',
],
],
'handler' => new \Inmanturbo\PathRouter\Handlers\PathBasedViewResponseHandler,
],
],
];
```## Testing
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [inmanturbo](https://github.com/inmanturbo)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.