Download the PHP package eloquent-works/fellowship without Composer
On this page you can find all versions of the php package eloquent-works/fellowship. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eloquent-works/fellowship
More information about eloquent-works/fellowship
Files in eloquent-works/fellowship
Package fellowship
Short Description Fellowship provides elegant friendship and social connection tools for Laravel applications, including friend requests, blocks, mutual friends, and relationship management.
License MIT
Informations about the package fellowship
🤝 Laravel Fellowship
A complete fellowship and social-connection package for Laravel applications.
Laravel Fellowship adds fellowship requests, accepted connections, blocking, mutual fellowships, request expiration, resend cooldowns, lifecycle events, optional web routes, and maintenance commands to your Eloquent models.
✨ Highlights
- Send, accept, deny, cancel, and expire fellowship requests
- Create and remove accepted fellowships
- Block and unblock users
- Prevent requests between blocked users
- Retrieve incoming and outgoing requests
- Retrieve accepted and blocked users
- Find and count mutual fellowships
- Configure request expiration and resend cooldowns
- Dispatch lifecycle events for application integrations
- Register optional web routes with
Route::fellowship() - Customize package models, tables, routes, and controllers
- Expire stale pending requests with an Artisan command
📋 Requirements
| Laravel | PHP | Orchestra Testbench |
|---|---|---|
| 12.x | 8.2+ | 10.x |
| 13.x | 8.3+ | 11.x |
📦 Installation
Install Fellowship through Composer:
Publish the configuration and migrations:
Publish the optional route snippet during installation:
Run the migrations:
🧩 Add the Trait
Add HasFellowships to every Eloquent model that can participate in a fellowship:
📨 Fellowship Requests
Send a request:
Accept or deny an incoming request:
Cancel an outgoing request:
Check whether a request can be sent:
🤝 Accepted Fellowships
Check whether two models share an accepted fellowship:
Retrieve accepted fellowships:
Remove an accepted fellowship:
removeFellowshipWith() remains available as a compatibility alias.
👥 Mutual Fellowships
Retrieve mutual connections:
Count mutual connections:
Singular compatibility helpers are also available:
🚫 Blocking
Block or unblock another user:
Inspect blocking state:
Retrieve blocked users:
Blocking removes an existing request or accepted fellowship between the two models and prevents new requests until the blocker unblocks the other user.
🔎 Relationships and Status
Retrieve the stored relationship model:
Retrieve its status:
The status is one of the package status values, such as pending, accepted, denied, canceled, expired, or blocked; otherwise, it is null.
Request collections:
Relationship queries:
🛣️ Web Routes
Fellowship does not load web routes automatically. Register them where you want them in routes/web.php:
Customize the route group:
The macro registers routes for sending, accepting, denying, canceling, and removing fellowships, along with blocking and unblocking users.
⚙️ Configuration
Publish the configuration file:
Important defaults:
Set expires_after_days to null when pending requests should never expire. Set request_cooldown_days to null or 0 to disable resend cooldowns.
📣 Events
Fellowship can dispatch the following lifecycle events:
FellowshipRequestSentFellowshipRequestAcceptedFellowshipRequestDeniedFellowshipRequestCanceledFellowshipRequestExpiredFellowshipRemovedFellowshipBlockedFellowshipUnblocked
Use these events for notifications, activity feeds, auditing, achievements, analytics, and other application-specific side effects.
Disable all package events through configuration:
⏳ Expiration and Scheduling
Expire stale pending requests manually:
Process records with a custom chunk size:
Schedule automatic expiration in your application:
📚 Documentation
- Documentation index
- Installation
- Configuration
- Usage
- API reference
- Routes
- Database
- Events
- Commands
- Controller statuses
- Customization
- Testing
- Upgrade guide
- FAQ
✅ Quality Checks
Run the complete quality suite:
Or run each check separately:
Format the package source:
🔒 Security
Please report security vulnerabilities privately according to SECURITY.md. Do not disclose unresolved vulnerabilities through public GitHub issues.
🤝 Contributing
See CODE_OF_CONDUCT.md.
🙏 Credits
Built by Eloquent Works.
📄 License
Laravel Fellowship is open-source software licensed under the MIT License.
All versions of fellowship with dependencies
illuminate/database Version ^12.0 || ^13.0
illuminate/events Version ^12.0 || ^13.0
illuminate/pagination Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
illuminate/routing Version ^12.0 || ^13.0