Action Preview
Action to preview a resource before saving or publishing it.
Author:
Novius
Documentation
#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.
The author
Novius is a French web agency specializing in the development of tailor-made web applications with Laravel.
We design robust, maintainable and business-oriented tools, with particular attention paid to the developer experience and the sustainability of projects. Our Filament plugins are used in production on customer projects and are designed to meet concrete needs, proven in the field.
From the same author
Slug
Plugin to generate and manage slugs automatically.
Author:
Novius
Relation Nested
Plugin to manage nested relationships using the Nested Set model.
Author:
Novius
Page Manager
Plugin to manage pages and structured content from the admin panel.
Author:
Novius
Redirect Manager
Plugin to manage URL redirections directly from the admin panel.
Author:
Novius
Featured Plugins
A selection of plugins curated by the Filament team
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
Advanced Tables (formerly Filter Sets)
Supercharge your tables with powerful features like user-customizable views, quick filters, multi-column sorting, advanced table searching, convenient view management, and more. Compatible with Resource Panel Tables, Relation Managers, Table Widgets, and Table Builder!
Kenneth Sese