Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 15, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 15, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 15, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 15, 2025

      Intel’s latest Arc graphics driver is ready for DOOM: The Dark Ages, launching for Premium Edition owners on PC today

      May 15, 2025

      NVIDIA’s drivers are causing big problems for DOOM: The Dark Ages, but some fixes are available

      May 15, 2025

      Capcom breaks all-time profit records with 10% income growth after Monster Hunter Wilds sold over 10 million copies in a month

      May 15, 2025

      Microsoft plans to lay off 3% of its workforce, reportedly targeting management cuts as it changes to fit a “dynamic marketplace”

      May 15, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      A cross-platform Markdown note-taking application

      May 15, 2025
      Recent

      A cross-platform Markdown note-taking application

      May 15, 2025

      AI Assistant Demo & Tips for Enterprise Projects

      May 15, 2025

      Celebrating Global Accessibility Awareness Day (GAAD)

      May 15, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Intel’s latest Arc graphics driver is ready for DOOM: The Dark Ages, launching for Premium Edition owners on PC today

      May 15, 2025
      Recent

      Intel’s latest Arc graphics driver is ready for DOOM: The Dark Ages, launching for Premium Edition owners on PC today

      May 15, 2025

      NVIDIA’s drivers are causing big problems for DOOM: The Dark Ages, but some fixes are available

      May 15, 2025

      Capcom breaks all-time profit records with 10% income growth after Monster Hunter Wilds sold over 10 million copies in a month

      May 15, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Filament Gaze: Show When Multiple Users View the Same Resource

    Filament Gaze: Show When Multiple Users View the Same Resource

    August 8, 2024

    Filament Gaze is a plugin for Filament PHP that allows you to display when other users view the same resource. This plugin provides a nice API to make a simple banner or even allow authorized users to take control of a locked page. Here’s the most basic example of using Gaze with a form:

    public static function form(Form $form): Form
    {
    return $form
    ->schema([
    GazeBanner::make(),

    // …
    ]);
    }

    Main features:

    Quickly display when other users are on the same resource
    Configurable poll time to determine how often it should inform Filament and get a list of users still viewing the page
    Lock a resource
    Allow lock overrides, supporting custom logic
    Conditionally hide the banner

    My favorite feature is the canTakeControl() method, which lets you define custom logic for taking over a page that someone else has control over:

    GazeBanner::make()
    ->lock()
    ->canTakeControl(fn() => auth()->user()->isAdmin())

    Using the above code, the owning user will see that they have control of the page and which other users are on the page. Here’s the interface when a user does not have control of a page, but has permission to take control:

    You can get started with this package, including full documentation on GitHub at discoverydesign/filament-gaze. This plugin is also listed on the Filament community plugin page.

    The post Filament Gaze: Show When Multiple Users View the Same Resource appeared first on Laravel News.

    Join the Laravel Newsletter to get all the latest Laravel articles like this directly in your inbox.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleHarness software intelligence to conquer complexity and drive innovation
    Next Article The Risk and Reward of Connected Cars 

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 16, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-4732 – TOTOLINK A3002R/A3002RU HTTP POST Request Handler Buffer Overflow

    May 16, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    Russian Hackers Exploit New NTLM Flaw to Deploy RAT Malware via Phishing Emails

    Development

    White-Label AI Website Builder

    Development

    Retail Inventory Management: Tips for Modern Retailers

    Web Development

    NVIDIA AI Releases Describe Anything 3B: A Multimodal LLM for Fine-Grained Image and Video Captioning

    Machine Learning

    Highlights

    Community News: Latest PECL Releases (02.04.2025)

    February 4, 2025

    Latest PECL Releases: openswoole 25.2.0 . PHP 8.4 support gRPC 1.70.0 – gRPC Core 1.70.0…

    Foto – simple image viewer

    February 7, 2025

    Bethesda lead Todd Howard suggests the rumored ‘Fallout’ and ‘Elder Scrolls’ remasters aren’t happening right now

    June 17, 2024

    Rilasciato Wine 10.7: Maggiori Prestazioni e Altre Novità

    May 4, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.