PHPackages                             remihin/filament-prefab - 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. remihin/filament-prefab

ActiveLibrary[Admin Panels](/categories/admin)

remihin/filament-prefab
=======================

prefab for a filament website

1.0.7(1y ago)01.3k1MITPHPPHP ^8.2

Since May 1Pushed 1y ago2 watchersCompare

[ Source](https://github.com/RemiHin/filament-prefab)[ Packagist](https://packagist.org/packages/remihin/filament-prefab)[ RSS](/packages/remihin-filament-prefab/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (5)Versions (44)Used By (0)

Prefab
======

[](#prefab)

Use this template to scaffold a new website

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

[](#installation)

1. Create a new project `laravel new project-name`
2. clone this repository
3. update the `composer.json` of your new project and change minimum stability to dev: `"minimum-stability": "dev",`
4. `composer require remihin/filament-prefab`
5. Install all modules:

- `php artisan prefab:filament --module=base --force`
    - be patient with the shell script, force is required to overwrite the user model
- `php artisan prefab:filament --module=blog`
- `php artisan prefab:filament --module=news`
- `php artisan prefab:filament --module=story`
- `php artisan prefab:filament --module=employee`
- `php artisan prefab:filament --module=form-builder`
- `php artisan prefab:filament --module=service`
- `php artisan prefab:filament --module=location`
- `php artisan prefab:filament --module=vacancy`
- `php artisan prefab:filament --module=job-alert`
- `php artisan prefab:filament --module=socials`
- NOTE: When updating modules after their initial rollout add `--force` to override local files. Additionally `--no-shell` can be added to prevent shell commands from being executed to speed up rolling out updates.

6. `composer dump`
7. `php artisan migrate`
8. Create a user `php artisan make:filament-user` and follow the prompts
9. `php artisan db:seed`
10. open `docker-compose.yml` and replace the container\_name with a name of this project
11. `docker compose up -d`
12. `npm install && npm run dev`

### How to use search

[](#how-to-use-search)

1. Add the `IsSearchable` interface to the model
2. Implement the required methods. Your IDE will inform you when adding the interface.
3. Add the `use Searchable` trait to the model
4. Add the config to `searchable.php` config by adding it to the `models` array where the key is the model and the value is an array with the searchable columns
5. Modules can also be specified in the `modules` section in `searchable.php`. Here the key is the relation name and the value an array of searchable fields. To search a module on a model add the name of the resource to the model array like you would add a column
6. In the example below the page searches in the columns `name` and `content`, as well as the module `heroImage`, for which the columns `title` and `content` are searchable

```
'models' => [
    Page::class => [
        'name',
        'content',
        'heroImage',
    ],
],

'modules' => [
    'heroImage' => [
        'title',
        'content',
    ],
],
```

### Elasticsearch

[](#elasticsearch)

The search module makes use of elasticsearch, please make sure `SCOUT_DRIVER` is set to `elastic` in your `.env`

To sync models to elastic run `php artisan search:sync`.

This project also contains a docker file which can be executed using laravel sail. The default port for elastic in this docker file is 9298. To allow your local project to communicate with this docker file add `ELASTIC_HOST=localhost:9298` to your `.env`

### How to use Hero Images

[](#how-to-use-hero-images)

1. add the `use Heroable` trait to the model
2. add `static::$model::heroableFields(),` to the form fields in the resource

### How to use Employees

[](#how-to-use-employees)

1. add the `use Employeeable` trait to the model
2. add `static::$model::employeeableFields(),` to the form fields in the resource

### How to use Seoable en Ogable

[](#how-to-use-seoable-en-ogable)

1. add the `use Seoable`trait to the model
2. add `static::$model::seoFields(),` to the form fields in the resource

### How to use Labels

[](#how-to-use-labels)

1. add the `use Labelable` trait to the model
2. add `static::$model::labelableFields(),` to the form fields in the resource

### How to use menus

[](#how-to-use-menus)

1. Implement `App/Contracts/Menuable` on models that should be able to be linked in menus.
2. Implement required methods
3. Available resources will be auto detected by the menu item resource

### How to use icon picker

[](#how-to-use-icon-picker)

1. create a folder in `/resources/images/svg` (if this folder is empty it will not be committed, so add atleast 1 icon)
2. Place all the SVGs voor de icons you want in this folder (make sure the name of the file is prefixed with `icon-`)
3. add the IconPicker to a resource (with preload):

```
IconPicker::make('icon')
    ->preload()
```

4. in the blade use `` to get the icon

### How to use titles and slugs

[](#how-to-use-titles-and-slugs)

1. For titles and slugs we use a forked and self-hosted project [filament-title-with-slug](https://github.com/MotivoZwolle/filament-title-with-slug)
2. On forms use the `TitleWithSlugInput` form component. This will handle both the title and the slug. Both fields are required and the slug field validates if it is unique.
3. For more documentation checkout [the motivo repository](https://github.com/MotivoZwolle/filament-title-with-slug)

### How to use blocks module

[](#how-to-use-blocks-module)

1. Simple add `BlockModule::make('content')` to any resource, where the param is the name of the column which stores the data.
2. Add `'content' => 'array'` to the casts of the model
3. New blocks can be created by making a new class in the `App/Filament/Plugins/Blocks` directory and extending the `BaseBlock` model
4. New blocks can be registered in the `active` array in the `blocks.php` config file
5. There is also a toggle content field, which can have nested fields. These are registed in the `toggle_content` array in the `blocks.php` config
6. You can also create your own set of blocks.
    1. First create a new array in the `blocks.php` config file. The key of this array is not restricted.
    2. When adding the block module to the resource you can specify a second parameter, which is the key of the array from the previous step, for example `BlockModule::make('content', 'form-builder')`

### How to use form module

[](#how-to-use-form-module)

1. The form module is build on top of the blocks module
2. Adding a new form can be done by creating a new form block, extending the `FormBlock` class
3. Blocks can be registered in the `form` array in the `blocks.php` config file.

### Front-end

[](#front-end)

1. visit `/blog` for a blog overview
2. visit `/blog/{blog:slug}` for the show page of a blog

### Settings

[](#settings)

1. For settings we use the [spatie plugin](https://filamentphp.com/plugins/filament-spatie-settings).
2. Optional: add the filament page to the correct navigation group `protected static ?string $navigationGroup = 'settings';`
3. Add the settings to view composer in `AppServiceProvider` to access variables in blade

### Generating a sitemap

[](#generating-a-sitemap)

1. When wanting to generate a sitemap, you need to add de model to the sitemap config file under key "models"
2. The model must have a getRoute() function where the route is defined
3. When all models are added, run the "app:generate-sitemap" command in the terminal

### Biggest Todos:

[](#biggest-todos)

- Update naar Laravel 11
- slugs
- redo SEO as field instead of trait (?)
- Cookie consent `Base module`
- Something formbuilder-like (alternative methods?) ()? `Contact module`
- Blocks module (WIP) `Blocks module`
- Email sending (?) `Job Alert`
- Search functionalities `Search Module`
- Donation module
- Redirects en dead-link tracker
- Add route for home
- Translations

### "Copypaste" Todos:

[](#copypaste-todos)

- Employee
- Location
- News
- Service
- Story
- Vacancy
- Settings
- Toptasks

dependencies:
-------------

[](#dependencies)

- `filamentphp/filament`
- `awcodes/filament-curator` (media manager)
- `solution-forest/filament-tree` (menu builder)
- `spatie/laravel-sitemap` (sitemap generation)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance41

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 55.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 ~18 days

Recently: every ~6 days

Total

8

Last Release

519d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5dc1b4c49a122f1f99a3727d12e01d5caf08d375fbeb429d2e2912efc592288?d=identicon)[RemiHin](/maintainers/RemiHin)

---

Top Contributors

[![RemiHin](https://avatars.githubusercontent.com/u/56312208?v=4)](https://github.com/RemiHin "RemiHin (72 commits)")[![DaanTimmerman1](https://avatars.githubusercontent.com/u/184112698?v=4)](https://github.com/DaanTimmerman1 "DaanTimmerman1 (31 commits)")[![rsmit-enrise](https://avatars.githubusercontent.com/u/183599673?v=4)](https://github.com/rsmit-enrise "rsmit-enrise (21 commits)")[![maikelenrise](https://avatars.githubusercontent.com/u/51745264?v=4)](https://github.com/maikelenrise "maikelenrise (4 commits)")[![dejury](https://avatars.githubusercontent.com/u/16034333?v=4)](https://github.com/dejury "dejury (2 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/remihin-filament-prefab/health.svg)

```
[![Health](https://phpackages.com/badges/remihin-filament-prefab/health.svg)](https://phpackages.com/packages/remihin-filament-prefab)
```

###  Alternatives

[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M601](/packages/laravel-ui)[laravel/breeze

Minimal Laravel authentication scaffolding with Blade and Tailwind.

3.0k31.3M148](/packages/laravel-breeze)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)

PHPackages © 2026

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