PHPackages                             wsmallnews/cms - 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. wsmallnews/cms

ActiveLibrary[Admin Panels](/categories/admin)

wsmallnews/cms
==============

Wsmallnews system cms modules

v1.0.12(3w ago)017[2 PRs](https://github.com/Wsmallnews/cms/pulls)MITPHPPHP ^8.2CI passing

Since Nov 24Pushed 2w agoCompare

[ Source](https://github.com/Wsmallnews/cms)[ Packagist](https://packagist.org/packages/wsmallnews/cms)[ Docs](https://github.com/wsmallnews/cms)[ GitHub Sponsors](https://github.com/Wsmallnews)[ RSS](/packages/wsmallnews-cms/feed)WikiDiscussions v1 Synced 1w ago

READMEChangelog (10)Dependencies (107)Versions (20)Used By (0)

Wsmallnews system cms modules
=============================

[](#wsmallnews-system-cms-modules)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f9a5ec95e53a5b7082df4b68ae88514c92d1688f14120a2860c9f26958eb00ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77736d616c6c6e6577732f636d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wsmallnews/cms)[![GitHub Tests Action Status](https://camo.githubusercontent.com/0acf58ccf08dc5efa85cd53f0a33a3225a0e66d0b03366a85fc6d5b3a2f82d56/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f77736d616c6c6e6577732f636d732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/wsmallnews/cms/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/51c4d5eccae0ad5c760e116a72f2d97eeb4f769fee4b692db255add124c13296/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f77736d616c6c6e6577732f636d732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/wsmallnews/cms/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/fbc2c1e9962b827da5a0ea60e8d04023c446a4779dbf66db18d9a85c3089fe4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77736d616c6c6e6577732f636d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wsmallnews/cms)

`wsmallnews/cms` is a Filament CMS package for navigation management, post management, tags, frontend CMS routes, authentication pages, and user profile pages. Navigation trees are powered by `wsmallnews/filament-nestedset`, and posts integrate with the Wsmallnews support, comment, preference, and category packages.

Features
--------

[](#features)

- Navigation tree management with `wsmallnews/filament-nestedset`
- Navigation type management for separating different navigation trees
- Post resource with media, tags, categories, comments, preferences, counters, and publishing states
- Configurable frontend CMS routes and theme layout
- Livewire frontend components for navigation, post lists, post detail, footer, and breadcrumbs
- User auth/profile/settings pages for CMS-facing users
- Scopeable data via `scope_type` and `scope_id`
- Optional Filament tenancy support

AI Guidelines
-------------

[](#ai-guidelines)

This package ships Laravel Boost AI Guidelines in `resources/boost/guidelines/core.blade.php`.

Install or enable Laravel Boost in your application, then refresh Boost resources so this package's guidelines are discovered and added to the project overview:

```
php artisan boost:update --discover
```

Boost updates the root `boost.json` and `CLAUDE.md` automatically. Check those files after running the command to confirm `wsmallnews/cms` is included.

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

[](#installation)

You can install the package via composer:

```
composer require wsmallnews/cms:^1.0
```

The package provides an install command. By default it also installs its support, comment, and preference dependencies:

```
php artisan sn-cms:install
```

To skip dependency installation and interactive prompts:

```
php artisan sn-cms:install --no-deps --no-interaction
```

You can publish only the config file individually:

```
php artisan vendor:publish --tag="cms-config"
```

Publish and run only the migrations individually:

```
php artisan vendor:publish --tag="cms-migrations"
php artisan migrate
```

Multi language support, you can publish the language files using:

```
php artisan vendor:publish --tag="sn-support-translations"
```

Optionally, you can publish the views using:

```
php artisan vendor:publish --tag="cms-views"
```

Configuration
-------------

[](#configuration)

The package configuration lives in `config/sn-cms.php`:

```
return [
    'scopeable' => [
        'scope_type' => 'sn-cms',
        'scope_id' => 0,
    ],

    'models' => [
        'navigation' => Wsmallnews\Cms\Models\Navigation::class,
        'navigation_type' => Wsmallnews\Cms\Models\NavigationType::class,
        'post' => Wsmallnews\Cms\Models\Post::class,
    ],

    'routes' => [
        'enabled' => true,
        'prefix' => 'cms',
        'name' => 'sn-cms.',
    ],
];
```

Use `sn-cms.panel_register` to control which Filament pages/resources are registered, `sn-cms.routes` to control frontend route generation, and `sn-cms.themes` to control frontend layout and dark mode behavior.

Filament plugin
---------------

[](#filament-plugin)

Register the plugin on your Filament panel:

```
use Wsmallnews\Cms\CmsPlugin;

$panel
    ->plugin(CmsPlugin::make());
```

`CmsPlugin` registers the pages and resources configured in `sn-cms.panel_register`, including:

- `Wsmallnews\Cms\Filament\Pages\Navigation\NavigationPage`
- `Wsmallnews\Cms\Filament\Pages\Category`
- `Wsmallnews\Cms\Filament\Pages\GeneralSetting`
- `Wsmallnews\Cms\Filament\Resources\NavigationTypes\NavigationTypeResource`
- `Wsmallnews\Cms\Filament\Resources\Posts\PostResource`
- `Wsmallnews\Cms\Filament\Resources\Tags\TagResource`

Usage
-----

[](#usage)

### Navigation page

[](#navigation-page)

`NavigationPage` extends `Wsmallnews\Cms\Filament\Pages\Navigation\Base`, which extends `Wsmallnews\FilamentNestedset\Filament\Pages\NestedsetPage`.

The base page automatically resolves or creates a `NavigationType` for the configured scope, applies the type's level to the nestedset tree, and scopes navigation records by:

- `scope_type`
- `scope_id`
- `type_id`
- `team_id` when tenancy is enabled

### Custom navigation page

[](#custom-navigation-page)

Create your own navigation page by extending the base page:

```
