PHP code example of discoverydesign / filament-gaze

1. Go to this page and download the library: Download discoverydesign/filament-gaze library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

discoverydesign / filament-gaze example snippets




namespace App\Filament\Resources;

use DiscoveryDesign\FilamentGaze\Forms\Components\GazeBanner;
// ...

class OrderResource extends Resource
{
    // ...

    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                GazeBanner::make(),
                    
                // ...
            ]);
    }
    
    // ...
}

GazeBanner::make()
    ->pollTimer(10),

GazeBanner::make()
    ->identifier('any-order'),

GazeBanner::make()
    ->lock()

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

GazeBanner::make()
    ->hidden(fn (?Order $record) => $record === null),

GazeBanner::make()
    ->hideOnCreate(),