How to: Collapse Laravel collection into comma seperated string?

Solution 1:

Use the implode method that Illuminate\Support\Collection offers:

$imploded = $collection->implode(',');

Laravel 8.x Docs - Collections - Available Methods - implode