PHPackages                             panakour/filament-flat-page - 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. panakour/filament-flat-page

ActiveLibrary

panakour/filament-flat-page
===========================

This is my package filament-flat-page

v0.3.0(3mo ago)121.7k3MITPHPPHP ^8.4CI passing

Since Oct 2Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/panakour/filament-flat-page)[ Packagist](https://packagist.org/packages/panakour/filament-flat-page)[ Docs](https://github.com/panakour/filament-flat-page)[ GitHub Sponsors](https://github.com/panakour)[ RSS](/packages/panakour-filament-flat-page/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (15)Versions (9)Used By (0)

Filament Flat Page Plugin
=========================

[](#filament-flat-page-plugin)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dcfbeaeb8f78e365755d5bbbfb371ee88df9dbc50105cd20226e47533d70f544/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70616e616b6f75722f66696c616d656e742d666c61742d706167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/panakour/filament-flat-page)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4c185581a3726c8ece2791266be56e0ef1e925ca412fa769d53ed413e9a2190b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70616e616b6f75722f66696c616d656e742d666c61742d706167652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/panakour/filament-flat-page/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/e53cff576f76b5d9878cc6051d81ef4f0e6b05e2e9d05253b96c78f893f7ff85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70616e616b6f75722f66696c616d656e742d666c61742d706167652f6669782d7068702d636f64652d7374796c696e672e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/panakour/filament-flat-page/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/bdb9396bfca8c581e9358d219eec9feaa53170363681447d64bcf443b4b09530/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70616e616b6f75722f66696c616d656e742d666c61742d706167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/panakour/filament-flat-page)

FilamentFlatPage is a plugin for [Filament](https://filamentphp.com/) that allows you to easily create and manage flat file pages with support for translations. It provides a simple way to add configurable, translatable pages to your Filament admin panel without the need for a database.

Compatibility
-------------

[](#compatibility)

Plugin VersionFilament Version`^0.1.0`Filament 4.x`^0.0.1`Filament 3.xFeatures
--------

[](#features)

- Easily create flat file pages with customizable forms
- Requires no database; data is stored in JSON files
- Multilingual support for creating translatable content via [outerweb/filament-translatable-fields](https://github.com/outer-web/filament-translatable-fields)
- Seamless integration with Filament admin panel

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

[](#installation)

You can install the package via composer:

```
composer require panakour/filament-flat-page
```

Optionally, you can publish the config file with:

```
php artisan vendor:publish --tag="filament-flat-page-config"
```

This will create a `config/filament-flat-page.php` file where you can set your preferred options:

```
return [
    'locales' => ['en', 'fr', 'el'],
];
```

If you want translatable fields, add the plugin to your Filament panel:

```
use Outerweb\FilamentTranslatableFields\TranslatableFieldsPlugin;

$panel->plugins([
    TranslatableFieldsPlugin::make()
        ->supportedLocales(config('filament-flat-page.locales')),
]);
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-flat-page-views"
```

Usage
-----

[](#usage)

1. Create a new page that extends `FlatPage`:

```
