PHP code example of cube-agency / filament-constructor
1. Go to this page and download the library: Download cube-agency/filament-constructor 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/ */
cube-agency / filament-constructor example snippets
namespace App\Filament\Constructor\Blocks;
use CubeAgency\FilamentConstructor\Constructor\Blocks\BlockRenderer;
use Filament\Forms\Components\Textarea;
class DoubleTextBlock extends BlockRenderer
{
public function name(): string
{
return 'double_text';
}
public function title(): string
{
return __('DoubleText');
}
public function schema(): array
{
return [
Textarea::make('first_text'),
Textarea::make('second_text'),
];
}
}