Reputation: 1047
When I use Sluggable Behavior on my localhost it works as expected, but when I upload that same code to online server, it doesn't work at all(slug attribute is empty in the database). How can I possibly know what went wrong?
So this method in SiteController works as expected on localhost.
public function actionTest(){
$attr = 'Lorem ipsum';
var_dump(Inflector::slug($attr));
die();
}
But that same method returns nothing on live server. var_dump gives string""(0)
Upvotes: 0
Views: 157
Reputation: 7886
intl PHP extension and ICU (>= v49) are both required by Inflector::slug(). read about it more in the Internationalization - setup-environment section of the Yii2 official docs.
Also check the requirement.php
file output so you can know if any other required lib is missing.
Upvotes: 1