M
M
Mikhail Artemiev2016-09-17 18:52:32
Yii
Mikhail Artemiev, 2016-09-17 18:52:32

Is it possible to make a dynamic slug out of the box in yii2?

As I understand it, SluggableBehavior, when creating an object, writes the slug of a certain attribute into a separate slug field in the database.
And I just need to get a transliteration of an object attribute on the fly, without any intermediate entries in the database.
Is it possible to write a separate method for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Artemiev, 2016-09-19
@the_mix

Found:
\yii\helpers\BaseInflector::slug($string)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question