I have a csv file from a remote path in a response as below . I am trying to read the columns on the excel file but i get the error file not found at path: 501149794557447800.csv .
What could i be missing here ?
Response
'payload' =>
array (
'caption' => 'Shops.csv',
'name' => 'Shops.csv',
'url' => 'https://filemanager.gupshup.io/fm/wamedia/data/5a060d55-7cb9-4b8b-af5a-4acb80150c83',
'contentType' => 'text/csv',
'urlExpiry' => 1621764623078,
),
Controller
$file = file_get_contents($payload['payload']['url']);
$theArray = Excel::toArray([], $file.'.csv');
$theArray = Excel::toArray([], $file.'.csv');
foreach ($theArray[0] as $key => $value)
{
}