-
-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more info on enabling rulesets for foreign languages
- Loading branch information
Showing
4 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/.php_cs.cache | ||
/.phpunit.cache | ||
/.phpunit.result.cache | ||
/.idea/ | ||
/build/ | ||
/vendor/ | ||
composer.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php namespace Cviebrock\EloquentSluggable\Tests\Models; | ||
|
||
/** | ||
* Class PostWithForeignRuleset | ||
* | ||
* A test model that customizes the Slugify engine with a foreign ruleset. | ||
* | ||
* @package Cviebrock\EloquentSluggable\Tests\Models | ||
*/ | ||
class PostWithForeignRuleset2 extends Post | ||
{ | ||
|
||
/** | ||
* Return the sluggable configuration array for this model. | ||
* | ||
* @return array | ||
*/ | ||
public function sluggable(): array | ||
{ | ||
return [ | ||
'slug' => [ | ||
'source' => 'title', | ||
'slugEngineOptions' => [ | ||
'ruleset' => 'finnish' | ||
], | ||
], | ||
]; | ||
} | ||
} |