Skip to content

How to use Arabic languages in Laravel Eloquent Sluggable & Slugify

Notifications You must be signed in to change notification settings

Nodekits/Eloquent-sluggable-Arabic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Eloquent-sluggable-Arabic | Slugify-Arabic

How to use arabic languages in Laravel Eloquent Sluggable & Slugify

Eloquent Sluggable & Slugify كيف تستعمل اللغة العربية في مكتبة

##installation

  1. Go to Slugify.php file in Dir :
/vendor/cocur/slugify/src/Slugify.php
  1. Change the const LOWERCASE_NUMBERS_DASHES to :
const LOWERCASE_NUMBERS_DASHES = '/([^\p{Arabic}a-zA-Z0-9]+|-+)/u';  
  1. Replace vendor/cocur/slugify/src/RuleProvider/DefaultRuleProvider.php with DefaultRuleProvider

##طريقة العمل

  1. توجه الى الملف Slugify.php في المجلد التالي :
/vendor/cocur/slugify/src/Slugify.php
  1. غير القيمة الثابتة LOWERCASE_NUMBERS_DASHES الى
const LOWERCASE_NUMBERS_DASHES = '/([^\p{Arabic}a-zA-Z0-9]+|-+)/u';  
  1. توجه الى الملف DefaultRuleProvider ثم استبدله بالملف التالي :

Thx for Abanoub Samaan

About

How to use Arabic languages in Laravel Eloquent Sluggable & Slugify

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages