Laravel 8 Str::finish() {#collection-method}
Str::finish
方法将指定的字符串修改为以指定的值结尾的形式:
use Illuminate\Support\Str;
$adjusted = Str::finish('this/string', '/');
// this/string/
$adjusted = Str::finish('this/string/', '/');
// this/string/
Str::finish
方法将指定的字符串修改为以指定的值结尾的形式:
use Illuminate\Support\Str;
$adjusted = Str::finish('this/string', '/');
// this/string/
$adjusted = Str::finish('this/string/', '/');
// this/string/