定制 pratikkuikel/panini 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pratikkuikel/panini

Composer 安装命令:

composer require pratikkuikel/panini

包简介

Panini cms based on filamentphp and wasabi json

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

panini.png

Not an AI generated Logo which has been upscaled and compressed again using AI.

Panini is a FilamentPHP package designed for developers who crave the freedom to build their own CMS without the constraints of pre-defined structures. It's not a CMS; it's a toolkit that generates Filament resources—Controllers, Factories, Migrations, Seeders, and Models. The star of the show is the Page Manager, allowing you to dynamically generate pages with customizable form fields. Embrace frontend independence and create your unique content management experience, all crafted by you for your project's specific needs. Because sometimes, the best CMS is the one you build yourself.

wtf

I honestly don't know what I have built but It does solve my problem and I will be damned if it solves yours too ! 😈

why is this called panini ?

Maybe because it's a sandwich and you can build it any way you like.

Enough with this monologue ! Let's get it up and running

Before you begin, Make sure you have Filamentphp installed with default AdminPanelProvider.

👉 Filamentphp Installation

This package assumes that AdminPanelProvider is the default one.

Now you can install the package via composer:

Make sure you have minimum stability set as dev in composer.json

    "minimum-stability": "dev"
composer require pratikkuikel/panini

Publish and run the migrations with:

php artisan vendor:publish --tag="panini-migrations"
php artisan migrate

Add Panini Plugin to AdminPanelProvider.

use Pratikkuikel\Panini\PaniniPlugin;

        return $panel
            ...
            ->plugin(new PaniniPlugin())
            ...

To enable page auto-discovery change :

            ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')

TO

            ->discoverPages(in: app_path('Filament/Admin/Pages'), for: 'App\\Filament\\Admin\\Pages')

Login to your Admin Panel.

There you have it, your raw panini.

Bake it, chef 👨‍🍳

Usage

⭐Generate Resources with Resource Generator

resource_generator.png

⭐Page Manager

page_manager.png

Using Page Manager

Page Manager currently supports two Fields right now, Select and TextInput. Feel Free to add More.

Attributes are the methods you chain to the Selected InputField. Multiple attributes is supported.

Multiple fields can be added to the page, All it needs is a click to Add field to the page button.

After you have created the page manager, click on Generate button to generate the page.

You can customize the generated page, Find the page in app\Filament\Admin\Pages directory and the view file in resources\views\filament\admin\pages directory.

The generated fields can be downloaded, reused or shared.
Here is the sample Json Field

[
    {
        "type": "Pratikkuikel\\Panini\\Filament\\Fields\\PaniniTextInput",
        "name": "name",
        "label": "name",
        "attributes": { "required": "true" }
    },
    {
        "type": "Pratikkuikel\\Panini\\Filament\\Fields\\PaniniSelect",
        "name": "option",
        "label": "Option",
        "attributes": { "required": "true" }
    }
]

Fetching the page data

You can fetch the data using

$data = PageManager::where('name','leslie-winkle')->first();

Here, wasabi converts your page's data fields into attributes. And those can be accessed using ✅

$data->name

Instead of ❌

$data->data['name'];

If there's a need to query page's data use Json Where Clauses

$data = PageManager::where('data->name','robot')->get();

Testing

I beg my pardon, TDD Army ! There are no tests, at least not at the moment. Will get it done, will I ?

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

pratikkuikel/panini 适用场景与选型建议

pratikkuikel/panini 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 5, 最近一次更新时间为 2024 年 01 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「filament」 「filamentphp」 「pratikkuikel」 「panini」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 pratikkuikel/panini 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 pratikkuikel/panini 我们能提供哪些服务?
定制开发 / 二次开发

基于 pratikkuikel/panini 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 20
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-23