Download the PHP package quvel/core without Composer
On this page you can find all versions of the php package quvel/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package core
Short Description Core foundation package for Quvel framework - Device management, push notifications, platform detection, distributed tracing, and more for Laravel applications
License MIT
Informations about the package core
Quvel Core
A Laravel package providing essential utilities for full-stack applications including device management, push notifications, platform detection, locale handling, distributed tracing, and more.
Installation
Step 1: Add the Package
Install via composer:
Step 2: Publish Configuration
Publish the configuration file to config/quvel.php:
This creates config/quvel.php with all available options.
Step 3: Publish and Run Migrations
Publish the migrations:
This publishes:
2024_01_01_000000_create_platform_settings_table- For platform-specific settings2024_01_01_000001_create_user_devices_table- For device management
Note: Migration filenames include timestamps (YYYY_MM_DD_HHMMSS format) to ensure they run in the correct order. The timestamps are part of Laravel's convention for managing database schema versions.
Run the migrations:
Step 4: Configure Environment Variables
Add the following to your .env file (optional, depending on features you use):
Step 5: Verify Installation
Check that the package is discovered:
You should see quvel/core in the list.
Check available commands:
Optional: Publish Additional Assets
Important: Routes are disabled by default. To enable device management routes, add to your .env:
You do not need to publish the routes file unless you want to customize the route definitions. The routes will work from the package once enabled via environment variables.
Troubleshooting
Package not discovered:
- Clear bootstrap cache:
rm bootstrap/cache/*.php - Run:
php artisan package:discover - Check
composer.jsonfor correct repository path
Migrations already exist:
- Migrations are automatically loaded from the package
- Only publish if you need to customize them
Config changes not taking effect:
- Run:
php artisan config:clear - Check that
.envvalues are correct
Table of Contents
- Captcha
- Device Management
- Push Notifications
- Platform Detection
- Locale Management
- Distributed Tracing
- Public IDs
- Redirects
- Security
- Middleware
- Publishing Assets
Captcha
Protect your endpoints from bots and automated attacks using Google reCAPTCHA.
Configuration
Usage
Verify captcha:
Protect routes with middleware:
Custom Captcha Driver
Set in config:
Events
Device Management
Track user devices across web, mobile, and desktop platforms. Register devices, manage push tokens, and maintain device lifecycle.
Configuration
Usage
Register a device:
Manage devices:
Device Model
API Routes
Publish and enable device routes:
Available endpoints:
POST /api/devices/register- Register a devicePOST /api/devices/push-token- Update push tokenPOST /api/devices/deactivate- Deactivate deviceGET /api/devices/list- List user's devices
Middleware
Automatically detect and track devices:
Events
Push Notifications
Send push notifications to user devices across multiple platforms (FCM, APNS, Web Push). Supports device targeting and batch processing.
Configuration
Usage
Send to device:
Send to multiple devices:
Device Targeting
Get target devices:
Targeting scopes:
requesting_device- Only the device making the requestall_user_devices- All of the user's active devices
Custom Push Driver
Register in service provider:
Events
Platform Detection
Detect the platform (web, mobile, desktop) from which requests originate.
Configuration
Usage
Platform tags:
Available platform tags:
- Runtime:
web,capacitor,cordova,electron,tauri - OS:
ios,android,macos,windows,linux - Form Factor:
mobile,tablet,desktop - Screen Sizes:
screen:xs,screen:sm,screen:md,screen:lg,screen:xl
Frontend Integration
Locale Management
Automatic locale detection and management from request headers.
Configuration
Usage
Locale is detected from:
Accept-Languageheader- Falls back to configured default
Distributed Tracing
Track requests across your distributed system with automatic trace ID generation and propagation.
Configuration
Usage
Frontend Integration
Public IDs
Generate user-facing IDs (ULIDs or UUIDs) for models instead of exposing database IDs.
Configuration
Usage
Add trait to your model:
Auto-generates public ID on creation:
Route Model Binding
Redirects
Smart redirects that work across web, mobile, and desktop platforms using universal links, custom schemes, or landing pages.
Configuration
Usage
Redirect Modes
Universal Links (recommended): Uses HTTPS URLs that open the app if installed, otherwise open in browser.
Custom Scheme: Uses custom URL scheme (myapp://).
Landing Page: Shows countdown page before redirect.
Web Only: Always redirects to web URL.
Security
Internal Request Validation
Protect internal endpoints from external access:
Protect routes:
Frontend SSR integration:
Middleware
Available Middleware
Global Configuration
Extending the Package
Custom Implementations
All core services use contracts and can be extended or replaced:
Available Contracts
CaptchaVerifierCaptchaDriverInterfaceDeviceManagerLocaleResolverPlatformDetectorPublicIdGeneratorPushManagerPushDriverAppRedirectorTraceIdGenerator
Events
Device Events
DeviceRegistered- Device registeredDeviceRemoved- Device deactivated
Push Notification Events
PushNotificationSent- Notification sent successfullyPushNotificationFailed- Notification failed
Captcha Events
CaptchaVerifySuccess- Captcha verification succeededCaptchaVerifyFailed- Captcha verification failed
Trace Events
PublicTraceAccepted- External trace ID accepted
Publishing Assets
License
MIT
All versions of core with dependencies
illuminate/contracts Version ^12.0
illuminate/support Version ^12.0
illuminate/log Version ^12.0
illuminate/http Version ^12.0
illuminate/database Version ^12.0
illuminate/broadcasting Version ^12.0
illuminate/queue Version ^12.0
illuminate/events Version ^12.0
monolog/monolog Version ^3.9
psr/log Version ^3.0
ext-curl Version *
ext-openssl Version *