阅读(887) (3)

Laravel 8 afterLast {#collection-method}

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

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

use IlluminateSupportStr;

$slice = Str::of('AppHttpControllersController')->afterLast('');

// 'Controller'