I have a variable $name which can sometimes contain spaces and special characters like '%' '&' etc.how can I remove all of those using regex or in any other way?
*/
public function handle()
{
$urls = Business::pluck('ical');
$names = Business::pluck('name');
foreach ($urls as $url) {
foreach ($names as $name) {
$test= explode("\n", $name);
dd($test);
$response = Curl::to($url)
->download('ical/'.$name.'.ics');
}