dcplibrary / papiaccount
Laravel package for PAPIAccount
Requires
- php: ^8.1
- blashbrook/papiclient: dev-dev-master
- dcplibrary/papishared: dev-main
- illuminate/support: ^9.0||^10.0||^11.0||^12.0
- livewire/flux: ^2.4
Requires (Dev)
- barryvdh/laravel-debugbar: ^3.16
- friendsofphp/php-cs-fixer: ^3.0
- larastan/larastan: ^2.0
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.15
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^10.0||^11.0
- spatie/laravel-error-solutions: ^1.0
README
A Laravel package for PAPIAccount functionality.
Installation
You can install the package via composer:
composer require dcplibrary/papiaccount
IMPORTANT
The included views require a Flux UI Pro License. However, you can remove the requirement for livewire/flux from composer.json and edit the views to use Tailwind CSS or any other UI framework.
Configuration
Add Middleware to bootstrap/app.php
->withMiddleware(function (Middleware $middleware): void { $middleware->alias([ 'access.secret' => Dcplibrary\PAPIAccount\App\Http\Middleware\AccessSecret::class, ]); $middleware->trustProxies( at:'*', headers: Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO ); })
Publish the configuration file:
php artisan vendor:publish --tag="papiaccount-config"
This will publish the configuration file to config/papiaccount.php
.
Usage
Basic Usage
use Dcplibrary\PAPIAccount\PAPIAccount; $instance = new PAPIAccount(); echo $instance->name(); // PAPIAccount echo $instance->version(); // 1.0.0
Using the Facade
use Dcplibrary\PAPIAccount\Facades\PAPIAccount; PAPIAccount::name(); // PAPIAccount PAPIAccount::version(); // 1.0.0
Service Provider Registration
The service provider is automatically registered. The package provides:
- Routes at
/papiaccount
- Views under the
papiaccount
namespace - Configuration merging
- Database migrations
Testing
Run the tests with:
composer test
Code Quality
Run code formatting:
composer format
Run static analysis:
composer analyse
Contributing
Please see CONTRIBUTING.md for details.
Security
If you discover any security-related issues, please email blashbrook@dcplibrary.org instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
Credits
About DC Public Library
This package is developed and maintained by the DC Public Library development team.