Laravel 8 explode {#collection-method}
2021-07-19 10:32 更新
explode 方法使用指定的分割符分割字符串,并返回包含字符串每个部分的集合:
use Illuminate\Support\Str;
$collection = Str::of('foo bar baz')->explode(' ');
// collect(['foo', 'bar', 'baz']) 以上内容是否对您有帮助:

免费 AI IDE


更多建议: