Filament Title With Slug 项目教程

Filament Title With Slug 项目教程

filament-title-with-slug"Title With Slug" Input - Easy Permalink Slugs for Filament Forms (PHP / Laravel / Livewire)项目地址:https://gitcode.com/gh_mirrors/fi/filament-title-with-slug

1. 项目目录结构及介绍

filament-title-with-slug/
├── config/
│   └── filament-title-with-slug.php
├── docs/
│   └── README.md
├── resources/
│   ├── lang/
│   └── views/
├── src/
│   ├── Components/
│   ├── Filament/
│   └── TitleWithSlugInput.php
├── tests/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
├── composer.json
├── package-lock.json
├── package.json
├── phpstan-baseline.neon
├── phpstan.neon.dist
├── phpunit.xml.dist
├── pint.json
├── postcss.config.js
└── tailwind.config.js

目录结构介绍

  • config/: 包含项目的配置文件 filament-title-with-slug.php
  • docs/: 包含项目的文档文件,如 README.md
  • resources/: 包含项目的语言文件和视图文件。
    • lang/: 包含多语言翻译文件。
    • views/: 包含视图模板文件。
  • src/: 包含项目的源代码。
    • Components/: 包含自定义组件的代码。
    • Filament/: 包含与 Filament 相关的代码。
    • TitleWithSlugInput.php: 主要功能实现文件。
  • tests/: 包含项目的测试代码。
  • .editorconfig: 编辑器配置文件。
  • .gitattributes: Git 属性配置文件。
  • .gitignore: Git 忽略文件配置。
  • LICENSE.md: 项目许可证文件。
  • README.md: 项目介绍文件。
  • composer.json: Composer 依赖管理文件。
  • package-lock.json: 锁定依赖版本文件。
  • package.json: Node.js 依赖管理文件。
  • phpstan-baseline.neon: PHPStan 静态分析配置文件。
  • phpstan.neon.dist: PHPStan 配置文件。
  • phpunit.xml.dist: PHPUnit 测试配置文件。
  • pint.json: Pint 配置文件。
  • postcss.config.js: PostCSS 配置文件。
  • tailwind.config.js: Tailwind CSS 配置文件。

2. 项目启动文件介绍

项目的主要启动文件是 src/TitleWithSlugInput.php。该文件定义了 TitleWithSlugInput 类,用于在 Filament 表单中添加标题和 slug 输入字段。

namespace Camya\Filament;

use Filament\Forms\Components\TextInput;

class TitleWithSlugInput extends TextInput
{
    // 类实现代码
}

3. 项目配置文件介绍

项目的配置文件位于 config/filament-title-with-slug.php。该文件包含了项目的各种配置选项,如标签、占位符、slug 生成规则等。

return [
    'labels' => [
        'title' => 'Title',
        'slug' => 'Slug',
    ],
    'placeholders' => [
        'title' => 'Enter title here',
        'slug' => 'Enter slug here',
    ],
    'slug_generator' => 'default', // 默认 slug 生成器
    'permalink_preview' => [
        'hide_host' => false, // 是否隐藏主机名
    ],
];

通过修改该配置文件,可以自定义项目的各种行为和显示效果。

filament-title-with-slug"Title With Slug" Input - Easy Permalink Slugs for Filament Forms (PHP / Laravel / Livewire)项目地址:https://gitcode.com/gh_mirrors/fi/filament-title-with-slug

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夏庭彭Maxine

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值