1. Go to this page and download the library: Download yieldstudio/filament-panel 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/ */
yieldstudio / filament-panel example snippets
use YieldStudio\FilamentPanel\Plugins\YieldPanel;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(
YieldPanel::make()
->withSuggestedColors() // Apply YieldStudio color palette
->withSuggestedFont() // Use Inter font
->withSuggestedIcons() // Use Phosphor icons
);
}
use YieldStudio\FilamentPanel\Actions\CopyAction;
// In a table
public static function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('id'),
TextColumn::make('email'),
])
->actions([
CopyAction::make()
->copyable(fn ($record) => $record->email),
]);
}
// In a form or infolist
CopyAction::make()
->copyable(fn ($record) => $record->api_key)
->successNotificationTitle('API Key copied!')