tobiasla78 / filament-simple-pages
This is my package filament-simple-pages
Fund package maintenance!
tobiasla78
Requires
- php: ^8.1
- filament/filament: ^3.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.1
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
filament-simple-pages
Create pages from within your Filament panel. Intended for privacy policy, imprint, etc.
Features
- Resource in your AdminPanelProvider to create pages
- Customize the URL of your pages
- Optional image field
- View pages from another panel
- View pages from without panels
- Toggle search engine indexing for each page
- Toggle the visibility of the page
- Support for dark mode
Installation
You can install the package via composer:
composer require tobiasla78/filament-simple-pages
Install the plugin and run the migrations:
php artisan filament-simple-pages:install
Basic Usage
Add the resource to create pages in your panel
Register the plugin in your AdminPanelProvider:
use Tobiasla78\FilamentSimplePages\FilamentSimplePagesPlugin; public function panel(Panel $panel): Panel { return $panel ->path('admin') ->plugins([ FilamentSimplePagesPlugin::make() ->prefixSlug('page') ]) }
For example: ->prefixSlug('page')
will set the page URL to http://localhost/admin/page/privacy-policy
.
View pages from another panel
You can make the pages viewable in another Filament panel:
use Tobiasla78\FilamentSimplePages\Pages\SimplePage; public function panel(Panel $panel): Panel { return $panel ->path('user') ->pages([ SimplePage::class, ]) }
The URL would be http://localhost/user/page/privacy-policy
.
Advanced Usage
- Customisation - Customize resource or publish views
- Register Pages Outside Filament - Make pages viewable outside of Filament
- Upgrade Guide - Upgrade version from 0.x.x to 1.x.x
Support
discussion or Filament PHP Discord
License
The MIT License (MIT). Please see License File for more information.