logo, improved listing, some helpers, mail confirms table, confirmed flag, user title column..

This commit is contained in:
2018-07-22 15:43:17 +02:00
parent 9081b38425
commit a3ba68ea98
47 changed files with 1462 additions and 292 deletions
+9 -2
View File
@@ -654,11 +654,18 @@ class Str extends \Illuminate\Support\Str
return preg_replace('/,\s*([}\]])/s','\1', $str);
}
public static function ellipsis($str, $maxlen)
public static function ellipsis($str, $maxlen, $margin=10)
{
$len = mb_strlen($str);
if ($len > $maxlen) {
return mb_substr($str, 0, $maxlen) . '…';
$hard = mb_substr($str, 0, $maxlen);
$lastspace = mb_strrpos($hard, ' ');
if ($lastspace > $maxlen - $margin) {
$hard = mb_substr($hard, 0, $lastspace);
}
return $hard . '…';
}
return $str;