New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

novius/laravel-nova-publishable

A Laravel Nova package for publishable fields
11,157 2
Install
composer require novius/laravel-nova-publishable
Latest Version:3.1.2
PHP:>=8.2
Laravel:10 – 13
Older releases:8 · 9
License:AGPL-3.0-or-later
Last Updated:May 12, 2026
Links: GitHub  ·  Packagist
Maintainer: novius

Laravel Nova Publishable

Packagist Release License: AGPL v3

Introduction

This package allows you to manage Laravel Models which user Laravel Publishable in Laravel Nova.

Requirements

  • Laravel Nova >= 4.0
  • Laravel >= 10.0
  • PHP >= 8.2

NOTE: These instructions are for Laravel >= 10.0 and PHP >= 8.2 If you are using prior version, please see the previous version's docs.

Installation

You can install the package via composer:

composer require novius/laravel-nova-publishable

Add Publishable trait on your Nova Resource:

use Laravel\Nova\Resource;
use Novius\LaravelNovaPublishable\Nova\Traits\Publishable;

class Post extends Resource
{
    use Publishable;

Then you can insert Publishable fields on your Nova Resource. You can also add the Publication Status Filter.

class Post extends Resource
{
    public function fields(NovaRequest $request): array
    {
        return [
            PublicationBadge::make(), // Only display on not forms
            PublicationStatusField::make()->onlyOnForms(),
            PublishedFirstAt::make()->hideFromIndex(),
            PublishedAt::make()->onlyOnForms(),
            ExpiredAt::make()->onlyOnForms(),
        ];
    }

    public function filters(NovaRequest $request): array
    {
        return [
            new PublicationStatus(),
        ];
    }

You can use the UpdatePlucationStatus action to mass update the publication status of your models.

    public function actions(Request $request): array
    {
        return [
            UpdatePublicationStatus::make(),
        ];
    }

Lang files

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

php artisan vendor:publish --provider="Novius\LaravelNovaPublishable\LaravelNovaPublishableServiceProvider" --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

epartment/nova-dependency-container

A Laravel Nova field container allowing to depend on other fields values

4,693,752 378
eminiarts/nova-tabs

Laravel Nova - Tabs.

4,610,439 464
ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

3,857,876 616
spatie/nova-tags-field

A tags field for Nova apps

2,337,323 301
kabbouchi/nova-impersonate

A Laravel Nova field allows you to authenticate as your users.

2,268,645 234

Version History

Version Released PHP Laravel License
3.1.2 >=8.2 ^10.0 | ^11.0 | ^12.0 | ^13.0 AGPL-3.0-or-later
3.1.1 >=8.2 ^10.0|^11.0|^12.0 AGPL-3.0-or-later
3.1.0 >=8.2 ^10.0|^11.0|^12.0 AGPL-3.0-or-later
3.0.1 >=8.2 ^10.0|^11.0 AGPL-3.0-or-later
3.0.0 >=8.2 ^10.0|^11.0 AGPL-3.0-or-later