-1
I’m doing maintenance on a project done in Laravel, where the object files is saved in this path ,pdf files
C: xamp2 htdocs pmo public projects_files
The code snippet where you save the files is this
public function salvar($objArquivo, $objProjeto, $objDataAtualizacao) {
    $strCaminho = public_path('projetos_arquivos') . '\\' . $objProjeto->codigo; // 'public\projetos_arquivos\codigo_projeto'
    $strNome = $objProjeto->codigo . "_" . $objDataAtualizacao->format("d-m-Y"); // Nomeia arquivo com codigo do projeto + data passada como argumento
    if(!file_exists($strCaminho)) { // Cria pasta para o projeto, caso não já exista uma
        $objProjetoDiretorio = File::makeDirectory($strCaminho);
    }
    $objArquivo->move($strCaminho, $strNome . ".pdf"); // Salvando arquivo no servidor
    $strCaminhoArquivo = $strCaminho . "\\" . $strNome . ".pdf";
    return($strCaminhoArquivo);
}
When saving a new object with the same name that already exists on this page ,the new object takes the files of the already existing object .
how do I save the file to another folder?? and view the files in this new folder and the old one ??
my list be like this
public function listarArquivos($strCodigoProjeto, $intQuantidade) {
    $strCaminho = public_path() . "\\projetos_arquivos\\" . $strCodigoProjeto. "\\*";
    //$strCaminho2 = asset("projetos_arquivos/" . $strCodigoProjeto);
    //var_dump($strCaminho);exit();
    $arrArquivos = File::glob($strCaminho);
would like a light aew...when I get to create a new folder the data of the other not list
To create directory use this
– Ivan Ferrer