inmanturbo/path-router

This is my package path-router

v1.0.3 2024-01-24 20:32 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

composer require inmanturbo/path-router
php artisan vendor:publish --tag="path-router-config"

This is the contents of the published config file:

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

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.