If you see anything missing from this guide, please do not hesitate to send me a pull request. Any help is appreciated!
Not much has changed in Peek from v1 to v2, aside from basic Filament v3 and Livewire v3 compatibility. Here are the steps to follow when upgrading:
Make sure to follow the Upgrade Guide from Filament. It's essential to get your app ready for Filament v3 and Livewire v3 before upgrading the plugin.
composer require pboivin/filament-peek:"^2.0"
In your AdminPanelProvider
, register the FilamentPeekPlugin
class:
use Pboivin\FilamentPeek\FilamentPeekPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugins([
FilamentPeekPlugin::make(),
]);
}
php artisan filament:assets
php artisan view:clear
This is only needed if you have published the config file before:
php artisan vendor:publish --force --tag=filament-peek-config
The PreviewLink
component has been deprecated. Consider switching to the more powerful and customizable InlinePreviewAction
component:
-use Pboivin\FilamentPeek\Forms\Components\PreviewLink;
+use Filament\Forms\Components\Actions;
+use Pboivin\FilamentPeek\Forms\Actions\InlinePreviewAction;
public static function form(Form $form): Form
{
return $form->schema(['
- PreviewLink::make(),
+ Actions::make([
+ InlinePreviewAction::make(),
+ ]),
// ...
]);
}
You can find more information on Form Actions in the Filament Documentation.
Documentation