MKSine: Filament CMS with Plugins, Themes &amp; Blocks | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    MKSine: A Filament CMS with Plugins, Themes, and Blocks for Laravel        On this page       1. [  What Is MKSine? ](#what-is-mksine)
2. [  Installation and Bootstrap ](#installation-and-bootstrap)
3. [  Plugin System ](#plugin-system)
4. [  Hooks ](#hooks)
5. [  Page Builder Blocks ](#page-builder-blocks)
6. [  Themes, Menus, and Media ](#themes-menus-and-media)
7. [  Settings and Admin Console ](#settings-and-admin-console)
8. [  Key Takeaways ](#key-takeaways)

  ![MKSine: A Filament CMS with Plugins, Themes, and Blocks for Laravel](https://cdn.msaied.com/619/a6bec1a59695b3d3ffb212492862d25b.png)

 [  Composer Pacakge ](https://msaied.com/articles?category=composer-pacakge) [  Filament ](https://msaied.com/articles?category=filament)  #Laravel   #Filament   #CMS   #Page Builder   #Plugins   #Open Source  

 MKSine: A Filament CMS with Plugins, Themes, and Blocks for Laravel 
=====================================================================

     1 Sep 2026      4 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   What Is MKSine?  ](#what-is-mksine)
2. [  02   Installation and Bootstrap  ](#installation-and-bootstrap)
3. [  03   Plugin System  ](#plugin-system)
4. [  04   Hooks  ](#hooks)
5. [  05   Page Builder Blocks  ](#page-builder-blocks)
6. [  06   Themes, Menus, and Media  ](#themes-menus-and-media)
7. [  07   Settings and Admin Console  ](#settings-and-admin-console)
8. [  08   Key Takeaways  ](#key-takeaways)

 What Is MKSine?
---------------

Most Laravel projects that need a public-facing marketing site end up hand-rolling a content layer on top of Filament. [MKSine](https://github.com/MiranSalehi/mksine), by Miran Salehi, fills that gap. It ships pages, posts, categories, a block-based page builder, themes, menus, a media library, and a plugin system — all wired into a Filament 4/5 admin panel.

Installation and Bootstrap
--------------------------

Install the package and scaffold a Filament panel:

```bash
composer require miran/mksine
php artisan filament:install --panels

```

Before running the installer, make two manual edits:

1. Register `MksinePlugin::make()` on your panel in `AdminPanelProvider` and **remove** the default `->pages([Dashboard::class])` line — running both causes a 500 error.
2. Remove the default `Route::get('/')` handler in `routes/web.php` — MKSine serves the homepage through the active theme.

Then run:

```bash
php artisan mksine:install --migrate
php artisan mksine:create-super-admin

```

`mksine:install` publishes config, runs migrations, and calls `shield:generate --all`. If `MksinePlugin` is not registered on the panel at that moment, no MKSine permissions are created. Fix it afterwards with `php artisan shield:generate --panel=admin --all`.

Authorisation is handled by Filament Shield. The installer also patches `app/Models/User.php` to add the `FilamentUser` contract and the `InteractsWithMksine` trait, writing a timestamped backup first.

Plugin System
-------------

A MKSine plugin lives under `plugins/{id}/` with a `plugin.php` manifest and a class implementing `PluginInterface`. Generator commands handle the scaffolding:

```bash
php artisan mks-plugin:make notes --author="Your Name"
php artisan mks-plugin:discover
php artisan mks-plugin:install notes
php artisan mks-plugin:activate notes

```

Discovery caches the registry at `bootstrap/cache/mks_plugins_discovery.php`. Plugin state (discovered, installed, active, inactive, failed) is tracked in the `mks_plugins` table. If a plugin's `boot()` throws, a boot guard marks it failed and logs the message to `mks_plugins.boot_error` without taking down the rest of the app. Deactivating hides admin screens but leaves data intact; `--delete-data` is required to remove it.

Hooks
-----

MKSine provides two extension families:

- **Discovery hooks** — listener classes scanned by `php artisan mks:discover`, stored in `mks_hooks`, and togglable from the admin panel.
- **Runtime hooks** — closures or class callbacks registered via the `Hooks::` facade inside a plugin's `boot()`. These stay in memory and are not visible in the admin.

Only `FormHookManager` catches listener exceptions; table, resource, and page hooks let exceptions propagate. Listeners can implement `QueueableHookEventInterface` to queue heavy work.

Page Builder Blocks
-------------------

Blocks extend `BaseBuilderComponent` and define a Filament schema for editing and a Blade view for rendering. There is no auto-discovery — register each block manually:

```php
use Miran\Mksine\Core\PageBuilder\ComponentRegistry;

app(ComponentRegistry::class)->register(PriceTableBlock::class);

```

The page tree is stored in a `builder_payload` JSON column. Views receive a `$data` array and a `$children` array for container blocks. When a block type is missing or its view no longer exists, the renderer falls back to a yellow "Unknown component type" panel rather than throwing.

Themes, Menus, and Media
------------------------

- **Themes** — a directory under `themes/{id}/` or a Composer package; one is active at a time and supplies all storefront Blade views.
- **Menus** — nested, drag-to-reorder, supporting pages, posts, categories, and custom URLs assigned to theme locations.
- **Media library** — a custom single-disk store (not Spatie Media Library) with a `MediaPicker` component and automatic small/medium/large thumbnails. Image optimisation requires binaries such as `jpegoptim` on the server.

Settings and Admin Console
--------------------------

Plugins add settings tabs through `SettingsTabManager` rather than editing the settings page class. Every field is saved to the `settings` table by field name — prefix plugin field names to avoid overwriting core settings like `site_name`.

A super-admin-only console page runs an allowed set of Artisan and Composer commands with live output.

Key Takeaways
-------------

- Requires PHP 8.2, Laravel 11, and Filament 4 or 5 (Filament 5 needs Laravel 11.28+, Livewire 4, Tailwind 4).
- Plugin boot failures are isolated — one broken plugin does not crash the app.
- Blocks have no per-block Shield permission; guard sensitive rendered output yourself.
- Settings are saved immediately with no draft or audit trail.
- Current release is v1.5.1 — review the source before deploying to production.
- MIT licensed, community-maintained (not an official Filament project).

[Read the original article on Laravel News](https://laravel-news.com/mksine-filament-cms)

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fmsaied.com%2Farticles%2Fmksine-a-filament-cms-with-plugins-themes-and-blocks-for-laravel&text=MKSine%3A+A+Filament+CMS+with+Plugins%2C+Themes%2C+and+Blocks+for+Laravel) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fmsaied.com%2Farticles%2Fmksine-a-filament-cms-with-plugins-themes-and-blocks-for-laravel) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  Does MKSine work with Filament 5?        Yes. MKSine targets both Filament 4 and Filament 5. Filament 5 support requires Laravel 11.28 or higher, Livewire 4, and Tailwind 4. 

      Q02  What happens if a MKSine plugin throws an exception during boot?        A boot guard catches the exception, marks the plugin as failed in the mks_plugins table, and writes the error message to the boot_error column. The rest of the application continues running normally. 

      Q03  How do I add a custom page builder block in MKSine?        Extend BaseBuilderComponent, implement getType(), getSchema(), and getRenderView(), then register the class with the ComponentRegistry — typically from your plugin's boot() method. There is no auto-discovery. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://msaied.com/articles) 

 [ ![Livewire v3 Performance: Computed Properties, Dehydration Budgets, and Wire:model Lazy](https://cdn.msaied.com/620/e4d958595b3e6a6b47c586df3f972938.png) livewire laravel performance 

### Livewire v3 Performance: Computed Properties, Dehydration Budgets, and Wire:model Lazy

Stop over-fetching on every request cycle. This deep-dive covers Livewire v3 computed property memoisation, co...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 2 Sep 2026     3 min read  

  Read    

 ](https://msaied.com/articles/livewire-v3-performance-computed-properties-dehydration-budgets-and-wiremodel-lazy) [ ![Filament v3 Table Tricks: Deferred Loading, Live Search, and Custom Filter Forms](https://cdn.msaied.com/617/2c4c33f76e69e2d61f0b6cf2918a8ad2.png) filament laravel livewire 

### Filament v3 Table Tricks: Deferred Loading, Live Search, and Custom Filter Forms

Go beyond the defaults with Filament v3 tables: wire up deferred loading for heavy datasets, build live search...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 1 Sep 2026     4 min read  

  Read    

 ](https://msaied.com/articles/filament-v3-table-tricks-deferred-loading-live-search-and-custom-filter-forms) [ ![Compoships: Eloquent Relationships on Multiple Columns in Laravel](https://cdn.msaied.com/618/d246f1cbcb9f9cd71afa1415b2329b51.png) eloquent laravel composer-package 

### Compoships: Eloquent Relationships on Multiple Columns in Laravel

Compoships lets you define Eloquent relationships, composite primary keys, and queue-safe collections across m...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 1 Sep 2026     3 min read  

  Read    

 ](https://msaied.com/articles/compoships-eloquent-relationships-on-multiple-columns-in-laravel) 

   [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

Explore

- [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [Contact](https://msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
