Download the PHP package padosoft/laravel-pii-redactor-admin without Composer

On this page you can find all versions of the php package padosoft/laravel-pii-redactor-admin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-pii-redactor-admin

Laravel PII Redactor Admin

A secure, batteries-included admin console for padosoft/laravel-pii-redactor — built with Laravel 13, React 19, Vite and Tailwind v4.

CI Latest Version Total Downloads License PHP Laravel Node React Tailwind


Table Of Contents


Why this package?

GDPR-grade PII redaction is only half the story — operators still need a safe way to:

laravel-pii-redactor-admin ships that admin surface as a drop-in Laravel package: zero config in your host app, disabled by default, and locked down behind explicit Gates. No raw PII ever leaves the database.

Features

Dashboard KPI cards (events, tokens, detokenises, errors) with light & dark themes
Playground Paste text, run a redaction, inspect tokens — without persisting raw input
Token map Browse stored tokens (originals never selected nor serialized)
Detokenise Justification-gated, throttled, audited reverse lookup
Audit logs Read-only timeline of every redact/detokenise event
Detectors View built-in detectors and their patterns
Custom rules Manage host-defined rules from the UI
Disabled by default One env flag turns the whole console on or off
Pre-built assets React/Tailwind compiled in-package; no host Vite config required

Screenshots

Design references live in resources/screenshots.

Page Preview
Dashboard
Dashboard (dark)
Playground
Token map
Audit logs
Detokenise
Detectors
Custom rules

Requirements

Tool Version
PHP ^8.3
Laravel ^13.0
Composer ^2.7
Node.js >=24 (only needed if you want to rebuild assets)
Database Anything Laravel supports (MySQL, PostgreSQL, SQLite…)

The compiled JS/CSS is shipped inside the package, so a host app does not need Node to run the console — only to develop it.


Quick Start (5 minutes, junior-dev friendly)

Follow these steps top-to-bottom on a Laravel 13 app where padosoft/laravel-pii-redactor is already installed and migrated.

1. Install the package

Both packages are not on Packagist yet? Jump to Installation Variants and come back here.

2. Publish config & migrations

What this does:

3. Enable the admin in .env

The console is disabled by default. Turn it on only in environments where you trust the audience (typically staging / a protected admin host):

4. Wire the authorization gates

Add the three Gates somewhere they get registered (e.g. app/Providers/AuthServiceProvider.php boot()):

Tweak the inner ->can(...) to match your existing permission system (Spatie, custom roles, hardcoded $user->is_admin, etc.). The package only asks these Gates — it never defines who passes them.

5. Open the console

Visit:

Logged in as a user that satisfies viewPiiRedactorAdmin, you should land on the dashboard. If you get a 403, your Gate returned false. If you get a 404, double-check PII_REDACTOR_ADMIN_ENABLED=true and that the config is cached (php artisan config:clear).


Installation Variants

Both packages on Packagist

Only this package on Packagist

Add the core package repository in the host app first:

Neither package on Packagist

Add both repositories before requiring the admin package:

Local development from a checkout

Composer ignores repositories declared inside a dependency, so you must declare the core package repository in the host app if it isn't on Packagist.

Configuration

config/pii-redactor-admin.php exposes:

Key Env Default Purpose
enabled PII_REDACTOR_ADMIN_ENABLED false Master switch — when false, no routes are registered.
route_prefix PII_REDACTOR_ADMIN_ROUTE_PREFIX pii-redactor-admin UI mount path.
api_prefix PII_REDACTOR_ADMIN_API_PREFIX pii-redactor-admin/api JSON API mount path used by the React app.
middleware ['web', 'auth'] Adjust to your auth stack (Sanctum, custom guards, etc.).

Always keep web,auth (or stricter) on both the UI and the API prefix.

Authorization

Ability Required for
viewPiiRedactorAdmin Loading any admin page
detokenisePiiRedactor Submitting the detokenise form
viewPiiRedactorRawSamples Showing raw scan samples in detector output

Detokenise additionally requires:

Security Model

Demo Fixtures

Safe demo payloads live in resources/demo/admin-api-fixtures.json and are reused by Playwright. They intentionally omit token originals, raw samples, redacted output, salts, and API keys.

Verification

Frontend development and CI use Node.js 24 or newer.

Every task must keep these gates green locally and in GitHub Actions:

Fresh host install verification can be run from the package root (PowerShell):

Release readiness notes live in docs/RELEASE.md.

Troubleshooting

404 on /pii-redactor-admin - Confirm `PII_REDACTOR_ADMIN_ENABLED=true` is loaded (`php artisan config:clear`, then `php artisan tinker` → `config('pii-redactor-admin.enabled')`). - Confirm the service provider is auto-discovered (it's listed in `composer.json` `extra.laravel.providers`). If you have `dont-discover` in your host `composer.json`, add it manually. - Run `php artisan route:list | grep pii-redactor-admin`.
403 once logged in - The `viewPiiRedactorAdmin` Gate returned `false`. Check the closure you wrote in step 4 of the Quick Start. - Verify the Gate is actually registered: `Gate::abilities()` should include the three keys.
Blank page / missing styles - Make sure `resources/dist` is present in the package (it's committed). If you cloned without `npm run build`, run it once. - Confirm your host app isn't overriding the asset routes. The package serves its own JS/CSS via the admin route prefix.
Migration error: table already exists - You probably ran the publish command twice. Remove the duplicate file from `database/migrations` and re-run `php artisan migrate`.
Detokenise returns 422 - Justification must be ≥ 10 characters. - Token must match the format produced by the core redactor. - Check the latest row in the audit table — it records the validation failure reason.

Contributing

Pull requests are welcome! Before opening one:

  1. Read docs/PROGRESS.md.
  2. Keep PRs small and focused.
  3. Run all gates from the Verification section.
  4. Every PR goes through the Copilot review loop.

Bug reports and feature ideas: open an issue.

Release

Current runtime release: v1.0.1.

v1.0.2 is reserved for the final docs/test-hardening ledger after v1.0.1. See docs/RELEASE.md for the full release procedure.

License

Released under the Padosoft.

Credits


All versions of laravel-pii-redactor-admin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/framework Version ^13.0
padosoft/laravel-pii-redactor Version ^1.1 || ^1.2 || dev-main
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package padosoft/laravel-pii-redactor-admin contains the following files

Loading the files please wait ...