阅读(2444) (5)

Laravel 8 after {#collection-method}

2021-07-03 16:54:24 更新

after 方法将返回字符串中指定值后的所有内容。如果字符串中不存在这个值,它将返回整个字符串:

use Illuminate\Support\Str;

$slice = Str::of('This is my name')->after('This is');

// ' my name'