PHP code example of fayne / laravel-filament-sensitive-field
1. Go to this page and download the library: Download fayne/laravel-filament-sensitive-field 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/ */
fayne / laravel-filament-sensitive-field example snippets
use Fayne\SensitiveField\Forms\Components\SensitiveField;
SensitiveField::make('secret')->revealUsing(
authorize: fn () => auth()->user()?->can('viewSecret') ?? false,
resolve: fn () => $record->secret,
);