I have this code which works perfectly on my local pc (MAC), but when I push everything into production this error appears:
local.ERROR: League\Flysystem\Exception: Impossible to create the root directory
foreach (explode('#', $pics_urls) as $url)
{
$curlCh = curl_init();
curl_setopt($curlCh, CURLOPT_URL, $url);
curl_setopt($curlCh, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlCh, CURLOPT_SSLVERSION, 3);
$curlData = curl_exec($curlCh);
curl_close($curlCh);
if(!empty($curlData)) {
Storage::disk('local')->put('public/photos/' . $bid->lot_id . '/' . ++$num . '.jpg', $curlData);
}
}
How can I fix this problem?