1. Go to this page and download the library: Download zpmlabs/filament-popup 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/ */
zpmlabs / filament-popup example snippets
use ZPMLabs\FilamentPopup\Enums\PopUpPosition;
TextColumn::make('name')
->badge()
->popup(UserPopupInfolist::class, PopUpPosition::TopCenter)
->searchable();
use Filament\Infolists\Components\IconEntry;
use Filament\Infolists\Components\TextEntry;
use Filament\Schemas\Components\Grid;
use Filament\Schemas\Schema;
final class UserPopupInfolist
{
public static function make(Schema $schema, mixed $record): Schema
{
return $schema
->record($record)
->components([
Grid::make(2)
->schema([
TextEntry::make('name'),
TextEntry::make('email'),
IconEntry::make('email_verified_at')
->label('Verified')
->boolean(),
]),
]);
}
}
use Filament\Actions\Action;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Actions;
use Filament\Schemas\Components\Form;
use Filament\Schemas\Components\Grid;
use Filament\Schemas\Schema;
final class UserPopupForm
{
public static function make(Schema $schema, mixed $record): Schema
{
return $schema
->record($record)
->statePath('popupFormData')
->components([
Form::make([
Grid::make(2)
->schema([
TextInput::make('name')
-> ->label('Save user')
->action('save'),
])
->alignEnd(),
])
->columnSpanFull(),
]);
}
}