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 ->color('pink') // coloring, and its accept a closure too 9 ->trigger('click') // support click and hover10 ->placement('right') // for more: https://alpinejs.dev/plugins/anchor#positioning11 ->offset(10) // int px, for more: https://alpinejs.dev/plugins/anchor#offset12 ->popOverMaxWidth('none')13 ->icon('heroicon-o-chevron-right') // show custom icon14 15 // direct HTML content16 ->content(fn($record) => new HtmlString($record->name.'<br>'.$record->email))17 18 // or blade content19 ->content(fn($record) => view('filament.test.user-card', ['record' => $record]))20 21 // or livewire component22 ->content(fn($record) => new HtmlString(Blade::render('@livewire(\App\Filament\Widgets\Stats::class, ["lazy" => true])')))23,
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,