PHP code example of schmeits / filament-character-counter
1. Go to this page and download the library: Download schmeits/filament-character-counter 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/ */
schmeits / filament-character-counter example snippets
use Schmeits\FilamentCharacterCounter\Forms\Components\TextInput;
use Schmeits\FilamentCharacterCounter\Forms\Components\Textarea;
TextInput::make('title')
->characterLimit(50),
Textarea::make('description')
->characterLimit(155),
RichEditor::make('content')
->characterLimit(155),
// Hide the counter on this field
TextInput::make('slug')
->showCharacterCounter(false)
->characterLimit(100),
// Conditionally display via Closure
Textarea::make('bio')
->showCharacterCounter(fn (Get $get) => $get('is_pulic'))
->characterLimit(255),