Looking to hire Laravel developers? Try LaraJobs

laravel-persian-slugify maintained by amirvahedix

Description
generate slugs for persian strings, just with 1 helper!
Author
Last update
2021/06/26 23:38 (dev-main)
Downloads
901

Comments
comments powered by Disqus

Laravel Persian Slugify

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 is true (default: true)

  • limit => limit characters to make slug (default: null no limit)