PHPackages                             yamshadow/nova-page-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. yamshadow/nova-page-manager

ActiveLibrary[Admin Panels](/categories/admin)

yamshadow/nova-page-manager
===========================

Page(s) and region(s) manager for Laravel Nova.

3.1.6(5y ago)059MITPHPPHP &gt;=7.1.0

Since Mar 27Pushed 5y agoCompare

[ Source](https://github.com/YamShadow/nova-page-manager)[ Packagist](https://packagist.org/packages/yamshadow/nova-page-manager)[ RSS](/packages/yamshadow-nova-page-manager/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (59)Used By (0)

Nova Page Manager
=================

[](#nova-page-manager)

[![Latest Version on Packagist](https://camo.githubusercontent.com/78811104887762053bc5deb26fa6c3051edb7d9fede10c65728447d742231428/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f7074696d6973746469676974616c2f6e6f76612d706167652d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/optimistdigital/nova-page-manager)[![Total Downloads](https://camo.githubusercontent.com/cebd48bc9d80eefa8156b5f28546e204da4637a6175b705b6a47501fa232cb0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f7074696d6973746469676974616c2f6e6f76612d706167652d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/optimistdigital/nova-page-manager)

This [Laravel Nova](https://nova.laravel.com) package allows you to create and manage pages and regions. The package is geared towards headless CMS's.

Requirements
------------

[](#requirements)

- Laravel Nova &lt;= 2.0.7 || &gt;= 2.0.10

Laravel Nova 2.0.8 and 2.0.9 are breaking for Nova Page Manager.

Features
--------

[](#features)

- Pages and Regions management
- Programmatically created templates for Pages and Regions
- Multilanguage support
- Optional pages draft support

Screenshots
-----------

[](#screenshots)

[![Index View](docs/index.png)](docs/index.png)

[![Filter Dropdown](docs/filter.png)](docs/filter.png)

[![Page Content Area](docs/content.png)](docs/content.png)

Installation
------------

[](#installation)

Install the package in a Laravel Nova project via Composer and run migrations:

```
# Install package
composer require optimistdigital/nova-page-manager

# Run automatically loaded migrations
php artisan migrate
```

Publish the `nova-page-manager` configuration file and edit it to your preference:

```
php artisan vendor:publish --provider="OptimistDigital\NovaPageManager\ToolServiceProvider" --tag="config"
```

Register the tool with Nova in the `tools()` method of the `NovaServiceProvider`:

```
// in app/Providers/NovaServiceProvider.php

public function tools()
{
    return [
        // ...
        new \OptimistDigital\NovaPageManager\NovaPageManager
    ];
}
```

Usage
-----

[](#usage)

### Creating templates

[](#creating-templates)

Templates can be created using the following Artisan command:

```
php artisan pagemanager:template {className}
```

This will ask you a few additional details and will create a base template in `App\Nova\Templates`.

The template base has a few properties:

```
// Define whether the template is for a page or a region
// Applicable values: 'page', 'region'
public static $type = 'page';

// The unique name for the page, usually similar to a slug
public static $name = 'about-us';

// The package has built in SEO fields support
// This boolean decides whether or not to display them
public static $seo = false;

// If you want to have multiple views with different
// templates, you can set two templates to have the
// same 'view' string and use it instead for matching
public static $view = null;

// Return all fields here, just as you would inside a resource
public function fields(Request $request): array
{
  return [
      Text::make('Title', 'title')
  ];
}
```

### Registering templates

[](#registering-templates)

All your templates have to be registered in the `config/nova-page-manager.php` config file.

```
// in /config/nova-page-manager.php

// ...
'templates' => [
  \App\Nova\Templates\HomePageTemplate::class,
],
// ...
```

### Defining locales

[](#defining-locales)

Locales can be defined similarly to how templates are registered. The config accepts a dictionary of locales.

```
// in /config/nova-page-manager.php

// ...
'locales' => [
  'en' => 'English',
  'et' => 'Estonian',
],

// OR

'locales' => function () {
  return Locale::all()->pluck('name', 'key');
},

// if you wish to cache the configuration, pass a reference instead:

'locales' => NovaPageManagerConfiguration::class . '::locales',
// ...
```

### Enabling page draft feature

[](#enabling-page-draft-feature)

Draft feature allows you to create previews of pages before publishing them. By default this feature is not installed, but you can install [nova-drafts](https://github.com/optimistdigital/nova-drafts) with the following command.

```
composer require optimistdigital/nova-drafts
```

### Modify page path

[](#modify-page-path)

To add a locale prefix to page paths or to modify page paths for any other reason on the `Page` model, supply a callback to `page_path` in the config.

```
// in /config/nova-page-manager.php

// ...
'page_path' => function (Page $page) {
  return "{$page->locale}/{$page->path}";
},

// if you wish to cache the configuration, pass a reference instead:

'page_path' => NovaPageManagerConfiguration::class . '::pageUrl',
// ...
```

### Add links to front-end pages

[](#add-links-to-front-end-pages)

To display a link to the actual page next to the slug, add or overwrite the closure in `config/nova-page-manager.php` for the key `page_url`.

```
// in /config/nova-page-manager.php

// ...
'page_url' => function (Page $page) {
  return env('FRONTEND_URL') . $page->path;
},

// if you wish to cache the configuration, pass a reference instead:

'page_url' => NovaPageManagerConfiguration::class . '::pageUrl',
// ...
```

### Overwrite package resources

[](#overwrite-package-resources)

You can overwrite the package resources (Page &amp; Region) by setting the config options in `nova-page-manager.php`.

Note: If you create your resources under `App\Nova` namespace, to avoid key duplication you must manually register all other resources in the `NovaServiceProvider`. See [registering resources](https://nova.laravel.com/docs/2.0/resources/#registering-resources) on Nova documentation.

Modifying Field values
----------------------

[](#modifying-field-values)

All fields have a registered macro `resolveResponseUsing(callable $resolveResponseCallback)` which allows you to modify the field's value before it is returned through the Page Manager's API (ie `nova_get_page()`).

The signature for the callback is: `function ($value, $templateModel) { ... }`.

For example:

```
Multiselect::make('Products')
  ->options(Product::all()->pluck('name', 'id'))
  ->resolveResponseUsing(function ($value, $templateModel) {
      return Product::findMany($value);
  }),

```

Helper functions
----------------

[](#helper-functions)

### nova\_get\_pages\_structure($previewToken)

[](#nova_get_pages_structurepreviewtoken)

The helper function `nova_get_pages_structure($previewToken)` returns the base pages structure (slugs, templates, child-parent relationships) that you can build your routes upon in the front-end. This does not return the pages' data. Preview token is optional and used only if draft feature is enabled. By default drafts will not be included in the structure.

Example response:

```
[
  {
    "locales": ["en_US", "et_EE"],
    "id": {
      "en_US": 3,
      "et_EE": 4
    },
    "name": {
      "en_US": "Home",
      "et_EE": "Kodu"
    },
    "slug": {
      "en_US": "/",
      "et_EE": "/"
    },
    "template": "home-page",
    "children": [
      {
        "locales": ["en_US"],
        "id": {
          "en_US": 5
        },
        "name": {
          "en_US": "About"
        },
        "slug": {
          "en_US": "about"
        },
        "template": "home-page"
      }
    ]
  }
]
```

### nova\_get\_regions()

[](#nova_get_regions)

The helper function `nova_get_regions()` returns all the regions and their data.

Example response:

```
[
  {
    "locales": ["en_US"],
    "id": {
      "en_US": 3
    },
    "name": {
      "en_US": "Main header"
    },
    "template": "main-header",
    "data": {
      "en_US": {
        "content": [
          {
            "layout": "horizontal-text-section",
            "attributes": {
              "text": "Lorem ipsum"
            }
          }
        ]
      }
    }
  }
]
```

### nova\_get\_page($pageId)

[](#nova_get_pagepageid)

The helper function `nova_get_page($pageId)` finds and returns the page with the given ID.

Example response for querying page with ID `3` (`nova_get_page(3)`):

```
{
  "locale": "en_US",
  "id": 3,
  "name": "Home",
  "slug": "/",
  "data": {
    "banner": [],
    "categories_grid": []
  },
  "template": "home-page"
}
```

### nova\_get\_page\_by\_slug($slug, $previewToken)

[](#nova_get_page_by_slugslug-previewtoken)

The helper function `nova_get_page_by_slug($slug, $previewToken)` finds and returns the page with the given slug. Preview token is optional and used to query draft pages when draft feature is enabled.

Example response for querying page with slug `/home` and preview token `L1SVNKDzBNVkBq8EQSna` (`nova_get_page("home", "L1SVNKDzBNVkBq8EQSna")`):

```
{
  "locale": "en_US",
  "id": 3,
  "name": "Home",
  "slug": "/",
  "data": {
    "banner": [],
    "categories_grid": []
  },
  "template": "home-page",
  "preview_token": "L1SVNKDzBNVkBq8EQSna"
}
```

### nova\_get\_page\_by\_path($slug, $previewToken, $locale)

[](#nova_get_page_by_pathslug-previewtoken-locale)

The helper function `nova_get_page_by_path($slug, $previewToken, $locale)` finds and returns the page with the given path and all of it's parents. Preview token and locale are optional. Preview token is used to query draft pages when draft feature is enabled.

Example response for querying page with slug `/home/about` and preview token `L1SVNKDzBNVkBq8EQSna` (`nova_get_page("home/about", "L1SVNKDzBNVkBq8EQSna")`):

```
{
  "locale": "en_US",
  "id": 2,
  "name": "about",
  "slug": "about",
  "parent": {
    "locale": "en_US",
    "id": 1,
    "name": "home",
    "slug": "home",
    "path": "/home",
    "parent_id": null,
    "data": {
      "banner": [],
      "categories_grid": []
    },
    "template": "home-page"
  },
  "parent_id": 1,
  "template": "about-page",
  "preview_token": "L1SVNKDzBNVkBq8EQSna",
  "path": "/home/about"
}
```

Credits
-------

[](#credits)

- [Tarvo Reinpalu](https://github.com/Tarpsvo)

License
-------

[](#license)

Nova page manager is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 86.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Recently: every ~19 days

Total

58

Last Release

2178d ago

Major Versions

1.9.9 → 2.0.02019-10-23

2.3.2 → 3.0.02020-01-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b157e73ab363d230c0619f9ace141bbf1add7d889a40e66cc6fd39b662f2188?d=identicon)[YamShadow](/maintainers/YamShadow)

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (255 commits)")[![Mikkoun](https://avatars.githubusercontent.com/u/9199470?v=4)](https://github.com/Mikkoun "Mikkoun (18 commits)")[![marttinnotta](https://avatars.githubusercontent.com/u/7058209?v=4)](https://github.com/marttinnotta "marttinnotta (6 commits)")[![slovenianGooner](https://avatars.githubusercontent.com/u/1257629?v=4)](https://github.com/slovenianGooner "slovenianGooner (4 commits)")[![YamShadow](https://avatars.githubusercontent.com/u/14164866?v=4)](https://github.com/YamShadow "YamShadow (3 commits)")[![lvdhoorn](https://avatars.githubusercontent.com/u/22305189?v=4)](https://github.com/lvdhoorn "lvdhoorn (3 commits)")[![kikoseijo](https://avatars.githubusercontent.com/u/1528668?v=4)](https://github.com/kikoseijo "kikoseijo (1 commits)")[![kaareloun](https://avatars.githubusercontent.com/u/19284921?v=4)](https://github.com/kaareloun "kaareloun (1 commits)")[![jgile](https://avatars.githubusercontent.com/u/3780633?v=4)](https://github.com/jgile "jgile (1 commits)")[![stephenlake](https://avatars.githubusercontent.com/u/1300442?v=4)](https://github.com/stephenlake "stephenlake (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![allantatter](https://avatars.githubusercontent.com/u/386999?v=4)](https://github.com/allantatter "allantatter (1 commits)")

---

Tags

laravelpagemanagernovaoptimistdigital

### Embed Badge

![Health badge](/badges/yamshadow-nova-page-manager/health.svg)

```
[![Health](https://phpackages.com/badges/yamshadow-nova-page-manager/health.svg)](https://phpackages.com/packages/yamshadow-nova-page-manager)
```

###  Alternatives

[optimistdigital/nova-page-manager

Page(s) and region(s) manager for Laravel Nova.

17988.5k](/packages/optimistdigital-nova-page-manager)[whitecube/nova-page

Static pages content management for Laravel Nova

23995.2k1](/packages/whitecube-nova-page)[outl1ne/nova-page-manager

Page(s) and region(s) manager for Laravel Nova.

17945.1k](/packages/outl1ne-nova-page-manager)[khalin/nova-link-field

A Laravel Nova Link field.

31562.2k2](/packages/khalin-nova-link-field)[digital-creative/nova-dashboard

The missing dashboard for nova.

7169.3k1](/packages/digital-creative-nova-dashboard)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
