Saldos #46
1 changed files with 5 additions and 3 deletions
|
@ -26,7 +26,8 @@ class CanastaHelper
|
||||||
$log = CanastaLog::where('descripcion', self::CANASTA_CARGADA)
|
$log = CanastaLog::where('descripcion', self::CANASTA_CARGADA)
|
||||||
->orderBy('created_at', 'desc')
|
->orderBy('created_at', 'desc')
|
||||||
->first();
|
->first();
|
||||||
$nombre = str_replace("csv/canastas/", "", $log->path);
|
$nombre = str_replace(storage_path(), "", $log->path);
|
||||||
|
$nombre = str_replace("/csv/canastas/", "", $nombre);
|
||||||
$result["nombre"] = str_replace(".csv", "", $nombre);
|
$result["nombre"] = str_replace(".csv", "", $nombre);
|
||||||
$result["fecha"] = $log->created_at;
|
$result["fecha"] = $log->created_at;
|
||||||
return $result;
|
return $result;
|
||||||
|
@ -39,9 +40,10 @@ class CanastaHelper
|
||||||
|
|
||||||
$nombre = $data->getClientOriginalName();
|
$nombre = $data->getClientOriginalName();
|
||||||
|
|
||||||
$data->move(storage_path($path), $nombre);
|
$storage_path = storage_path($path);
|
||||||
|
$data->move($storage_path, $nombre);
|
||||||
|
|
||||||
self::log($path . $nombre, self::ARCHIVO_SUBIDO);
|
self::log($storage_path . $nombre, self::ARCHIVO_SUBIDO);
|
||||||
|
|
||||||
return $nombre;
|
return $nombre;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue