alzoubi/multilang-slug
Composer 安装命令:
composer require alzoubi/multilang-slug
包简介
A package to generate multilingual slugs easily for Laravel models
README 文档
README
MultilangSlug is a PHP package for Laravel applications that automatically generates SEO-friendly slugs for models in multiple languages, including Arabic and English. Unlike Laravel's default Str::slug() method, which may not handle non-Latin scripts correctly, this package ensures proper slug generation across various locales and guarantees uniqueness in the database.
Features
- Multilingual Support: Handles multiple languages, including Arabic, without relying on transliteration.
- Automatic Uniqueness: Ensures that slugs are unique in your database, appending a counter if necessary.
- Customizable Separator: Define the word separator (e.g.,
-,_) for your slugs. - Locale Awareness: Automatically generates slugs based on the model's locale.
- Seamless Eloquent Integration: Works with your models using a simple Trait.
Installation
Install the package via Composer:
composer require alzoubi/multilang-slug
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-18