novius/laravel-filament-action-preview 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

novius/laravel-filament-action-preview

最新稳定版本:1.0.1

Composer 安装命令:

composer require novius/laravel-filament-action-preview

包简介

A Laravel Filament action for open front preview

README 文档

README

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.

统计信息

  • 总下载量: 583
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2026-02-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固