amirvahedix / laravel-persian-slugify
There is no license information available for the latest version (dev-main) of this package.
generate slugs for persian strings, just with 1 helper!
dev-main
2021-06-26 21:38 UTC
Requires
- php: ^7.1.8 || ^8.0
This package is auto-updated.
Last update: 2024-10-27 04:23:18 UTC
README
generate slugs for persian strings, just with 1 helper!
Installation
Install via composer:
composer require amirvahedix/laravel-persian-slugify
Usage
just use slugify()
helper anywhere you want in your project:
slugify('اسلاگ فارسی در لاراول!'); // اسلاگ-فارسی-در-لاراول slugify('Laravel Persian Slug!'); // laravel-persian-slug
Options
slugify()
helper has 4 arguments:
-
str
=> the string you want convert to slug -
delimiter
=> delimiter between words (default:-
) -
lowercase
=> converts all characters to lowercase if it istrue
(default:true
) -
limit
=> limit characters to make slug (default:null
no limit)