novius/laravel-filament-action-preview

A Laravel Filament action for open front preview
1,037 2
Install
composer require novius/laravel-filament-action-preview
Latest Version:1.0.1
PHP:>=8.2
License:AGPL-3.0-or-later
Last Updated:May 12, 2026
Links: GitHub  ·  Packagist
Maintainer: novius

Laravel Filament Action Preview

Packagist Release License: AGPL v3

Introduction

This package allows you to add Laravel Filament action to open the front preview url of a ressource.

Requirements

  • Laravel Filament >= 4
  • Laravel >= 11.0
  • Laravel >= 8.2

Installation

You can install the package via composer:

composer require novius/laravel-filament-action-preview

Usage

This package provides the following action:

  • \Novius\LaravelFilamentActionPreview\Filament\Actions\PreviewAction

If the model have a previewUrl method :

use Filament\Resources\Resource;
use Novius\LaravelFilamentActionPreview\Filament\Actions\PreviewAction;

class Post extends Resource
{
    public static function table(Table $table): Table
    {
        return $table
            ->actions([
                PreviewAction::make(),
            ]);
    }

Otherwise, you must specify the preview url :

use App\Models\Post as PostModel;
use Filament\Resources\Resource;
use Novius\LaravelFilamentActionPreview\Filament\Actions\PreviewAction;

class Post extends Resource
{
    public static function table(Table $table): Table
    {
        return $table
            ->actions([
                PreviewAction::make()
                    ->using(function(PostModel $record) {
                        return route('post.preview', ['post' => $record]);
                    }),
            ]);
    }

Lang files

If you want to customize the lang files, you can publish them with:

php artisan vendor:publish --provider="Novius\LaravelFilamentActionPreview\LaravelFilamentActionPreviewServiceProvider" --tag="lang"

Lint

Lint your code with Laravel Pint using:

composer run-script lint

Licence

This package is under GNU Affero General Public License v3 or (at your option) any later version.

Related Packages

pboivin/filament-peek

Full-screen page preview modal for Filament

428,566 252
swindon/filament-hashids

A Laravel Filament package that automatically encodes and decodes model IDs usin...

359 3
dusterio/link-preview

Link preview generation for PHP with Laravel support

334,095 127
empress/preview

Link preview generation for Empress.

14 0
tinusg/filament-hover-image-column

A Filament table column that shows a larger image preview on hover

2,455 8