PHP code example of webkenth / filament-code-field
1. Go to this page and download the library: Download webkenth/filament-code-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/ */
webkenth / filament-code-field example snippets
use Creagia\FilamentCodeField\CodeField;
return $form
->schema([
CodeField::make('my_json'),
// other fields
]);
use Creagia\FilamentCodeField\CodeField;
return $form
->schema([
CodeField::make('js_code')
->setLanguage(CodeField::JS),
// or
->jsField()
]);
use Creagia\FilamentCodeField\CodeField;
return $form
->schema([
CodeField::make('js_code')
->htmlField()
->disableAutocompletion(),
]);
use Creagia\FilamentCodeField\CodeField;
return $form
->schema([
CodeField::make('json')
->withLineNumbers(),
]);
use Creagia\FilamentCodeField\CodeField;
return $form
->schema([
CodeField::make('json')
->disabled(),
]);
use Creagia\FilamentCodeField\CodeField;
return $form
->schema([
CodeField::make('json')
->label('Your JSON data')
->hint('Top right corner info')
->helper('More info after the text field')
// more methods
,
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.