On this page
Installation
Install Lara Zeus Popover by running the following commands in your Laravel project directory.
1composer require lara-zeus/popover
Usage:
use it in your table:
1\LaraZeus\Popover\Tables\PopoverColumn::make('name') 2 // most of filament methods will work 3 ->sortable() 4 ->searchable() 5 ->toggleable() 6 7 // main options 8 ->trigger('click') // support click and hover 9 ->placement('right') // for more: https://alpinejs.dev/plugins/anchor#positioning10 ->offset(10) // int px, for more: https://alpinejs.dev/plugins/anchor#offset11 ->popOverMaxWidth('none')12 ->icon('heroicon-o-chevron-right') // show custom icon13 14 // direct HTML content15 ->content(fn($record) => new HtmlString($record->name.'<br>'.$record->email))16 17 // or blade content18 ->content(fn($record) => view('filament.test.user-card', ['record' => $record]))19 20 // or livewire component21 ->content(fn($record) => new HtmlString(Blade::render('@livewire(\App\Filament\Widgets\Stats::class, ["lazy" => true])')))22,
use it in your infolist:
1\LaraZeus\Popover\Infolists\PopoverEntry::make('name') 2 // main options 3 ->trigger('click') // support click and hover 4 ->placement('right') // for more: https://alpinejs.dev/plugins/anchor#positioning 5 ->offset(10) // int px, for more: https://alpinejs.dev/plugins/anchor#offset 6 ->popOverMaxWidth('none') 7 ->icon('heroicon-o-chevron-right') // show custom icon 8 9 // direct HTML content10 ->content(fn($record) => new HtmlString($record->name.'<br>'.$record->email))11 12 // or blade content13 ->content(fn($record) => view('filament.test.user-card', ['record' => $record]))14 15 // or livewire component16 ->content(fn($record) => new HtmlString(Blade::render('@livewire(\App\Filament\Widgets\Stats::class, ["lazy" => true])')))17,
use it in your forms as a placeholder:
1\LaraZeus\Popover\Form\PopoverForm::make('name') 2 // main options 3 ->trigger('click') // support click and hover 4 ->placement('right') // for more: https://alpinejs.dev/plugins/anchor#positioning 5 ->offset(10) // int px, for more: https://alpinejs.dev/plugins/anchor#offset 6 ->popOverMaxWidth('none') 7 ->icon('heroicon-o-chevron-right') // show custom icon 8 9 // direct HTML content10 ->content(fn($record) => new HtmlString($record->name.'<br>'.$record->email))11 12 // or blade content13 ->content(fn($record) => view('filament.test.user-card', ['record' => $record]))14 15 // or livewire component16 ->content(fn($record) => new HtmlString(Blade::render('@livewire(\App\Filament\Widgets\Stats::class, ["lazy" => true])')))17,