Download the PHP package eloquent-works/persona without Composer
On this page you can find all versions of the php package eloquent-works/persona. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eloquent-works/persona
More information about eloquent-works/persona
Files in eloquent-works/persona
Package persona
Short Description Laravel Persona gives your users elegant public profiles with slugs, bios, avatars, links, visibility, and profile pages.
License MIT
Informations about the package persona
👤 Laravel Persona
Elegant, customizable public profiles for Laravel applications.
Laravel Persona gives an Eloquent user model profile pages, unique public usernames, display names, headlines, mottos, biographies, avatars, banners, social links, custom links, visibility controls, publishing, view tracking, profile comments, completeness scoring, badges, and convenient model helpers.
📋 Supported Versions
| Package version | PHP | Laravel / Illuminate |
|---|---|---|
| Current | ^8.2 |
^12.0 \|\| ^13.0 |
Composer resolves the compatible Illuminate packages for the consuming Laravel application.
🚀 Installation
Install Persona:
Publish the configuration and migrations:
Run the migrations:
Add HasPersona to the application user model:
See Installation for publishing options and setup guidance.
✨ Features
- Public or private user profiles
- Slug-based public usernames and route model binding
- Configurable username-change tokens
- Reserved-name, format, length, and uniqueness checks
- Display names, headlines, mottos, biographies, and locations
- Avatar and banner URLs through Laravel filesystems
- Website URLs, social links, and custom links
- Publishing and configurable visibility requirements
- Public, published, and visible query scopes
- Profile view counters
- Profile comments with replies, approval, pinning, editing, and deletion
- Profile completeness scoring
- Custom profile badge awarding
- Lifecycle events for creation, updates, publishing, unpublishing, and views
- Publishable views and customizable public routes
- Configurable models, tables, field limits, feature flags, and storage
- PHPUnit, PHPStan/Larastan, Laravel Pint, and Composer quality scripts
🚀 Quick Start
Create a profile
Read or update the profile
Register the public profile route
Persona does not register public routes automatically.
The default route format is:
Generate URLs
👁️ Visibility and Publishing
Visibility follows:
When require_published_at is disabled, a public profile may be visible without a publication timestamp. When enabled, the profile must be public and have a past published_at value.
Private profile responses
By default, Persona preserves its historical behavior and returns 404 for
profiles that are not publicly visible:
Applications may instead render a privacy-safe placeholder:
The default private view displays:
This profile is private. This user has chosen to keep their profile private.
The private placeholder intentionally receives no Persona model and no user model. This prevents customized placeholder views from accidentally exposing private profile fields.
Customize the view with:
Authenticated profile owners may view their own private profile by default. Disable that behavior with:
🏷️ Username Tokens
Persona uses the profile slug as its public username.
Use the helpers on the user model:
An administrative change can skip token spending:
Persona normalizes the username and applies the configured length, regular expression, reserved-name, uniqueness, and token rules.
📊 Completeness
Refresh the profile's completeness score directly:
Or through the user model:
The user helper returns 0 when no Persona profile exists.
See Completeness and Badges.
🏅 Badges
Award a badge directly through the profile:
Or use the user-model helper:
The helper returns null when the user does not have a Persona profile.
💬 Profile Comments
Moderate and edit comments:
Retrieve common comment groups:
Persona provides the model API. The consuming application remains responsible for routes, request validation, authorization, rate limiting, spam controls, and guest identity handling.
See Profile Comments.
📣 Events
Persona can dispatch:
PersonaCreatedPersonaUpdatedPersonaPublishedPersonaUnpublishedPersonaViewed
Disable lifecycle events globally:
See Events.
⚙️ Configuration
Publish the configuration file:
Major configuration groups include:
See Configuration for the complete reference.
✅ Quality Checks
Run all package checks:
Or run them separately:
Validate Composer metadata before a release:
The quality pipeline should complete with zero formatting, PHPStan, or PHPUnit failures.
See Testing and Quality.
📚 Documentation
- Documentation Index
- Installation
- Configuration
- Usage
- Completeness and Badges
- Profile Comments
- Routes
- Events
- Customization
- Security
- Testing and Quality
🔐 Security
Treat every public profile field, URL, link, comment, metadata value, and badge attribute as user-generated or administrator-generated content.
Validate URLs, escape rendered values, authorize profile and comment changes, rate-limit public write endpoints, and avoid exposing private profiles through search, sitemaps, APIs, or public routes.
Security vulnerabilities should be reported privately according to SECURITY.md.
🤝 Contributing
See CODE_OF_CONDUCT.md.
🙏 Credits
Built by Eloquent Works.
📄 License
Laravel Persona is open-source software licensed under the MIT License.
All versions of persona with dependencies
illuminate/contracts Version ^11.15|^12.0|^13.0
illuminate/database Version ^11.15|^12.0|^13.0
illuminate/routing Version ^11.15|^12.0|^13.0
illuminate/support Version ^11.15|^12.0|^13.0