Download the PHP package corepine/reportable without Composer
On this page you can find all versions of the php package corepine/reportable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download corepine/reportable
More information about corepine/reportable
Files in corepine/reportable
Package reportable
Short Description Reusable polymorphic reporting for Laravel models with a starter Blade UI.
License MIT
Informations about the package reportable
corepine/reportable
Reusable polymorphic reporting for Laravel models with Livewire.
corepine/reportable gives you a small reporting foundation that you can reuse across reviews, comments, posts, and any other Eloquent model. It ships with:
- polymorphic
reporterandreportablerelations HasReportsandCanReportmodel concerns- config and enum backed report types and statuses
- a report manager/service for creating and resolving reports
- Livewire components for report modal and report inbox with encrypted parameters
- starter Blade components and routes
Installation
Quick Start
Add HasReports to models that may be reported:
Add CanReport to the actor model:
Using Livewire Components
Report Modal with Encrypted Parameters
The package includes a Livewire-powered report modal that automatically encrypts the reportable type and ID for security:
The button component automatically:
- Encrypts the model type and ID using Laravel's Crypt facade
- Dispatches a Livewire event to open the modal
- Passes encrypted parameters securely
Manual Usage with Encrypted Parameters
You can also trigger the modal manually using JavaScript:
Using the Encryption Helper
Reports Index with Livewire
The reports index page uses Livewire for real-time filtering and pagination:
Or use the included page route:
Modal Auto-Close
The Livewire modal automatically closes after a successful report submission and flashes a success message to the session.
Create a report in code:
$user->report($post, 'obscene', [
'message' => 'This content is inappropriate'
]);All versions of reportable with dependencies
laravel/framework Version ^11.0|^12.0|^13.0
livewire/livewire Version ^3.0