Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Devices Laravel Package

diego-ninja/laravel-devices

Laravel package for tracking authenticated user devices and managing sessions. Includes device verification, fingerprinting integrations, session locking/blocking with optional Google 2FA, location tracking, events, middleware/controllers, and caching support.

View on GitHub
Deep Wiki
Context7

API Reference

Overview

Laravel Devices provides a comprehensive REST API divided into three main sections:

  1. Device Management API - Manage and track devices
  2. Session Management API - Control user sessions
  3. Two-Factor Authentication API - Handle 2FA operations

Authentication

All API endpoints require authentication. The package uses your configured Laravel auth guard.

# Example with Bearer token
curl -X GET /api/devices \
  -H "Authorization: Bearer your-token" \
  -H "Accept: application/json"

Common Error Responses

Unauthorized (401)

{
    "message": "Unauthenticated."
}

Forbidden (403)

{
    "message": "This action is unauthorized."
}

Session Locked (423)

{
    "message": "Session locked"
}

Rate Limited (429)

{
    "message": "Too Many Attempts.",
    "retry_after": 60
}

Best Practices

  1. Always include appropriate headers:

    • Accept: application/json
    • Valid authentication token
    • Content-Type: application/json for POST/PATCH requests
  2. Handle rate limiting:

    • Check for 429 status codes
    • Respect the retry_after header
  3. Implement proper error handling:

    • Handle all possible status codes
    • Validate responses
    • Implement retry logic where appropriate
  4. Use appropriate HTTP methods:

    • GET for retrieving data
    • POST for creating
    • PATCH for updates
    • DELETE for removal

Next Steps

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport