Search code examples
laravellaravel-5copy

How copy entire directory from one folder to another using laravel 5


May be it's so easy but I couldn't find any proper answer in google or here!!

I did use

\File::copyDirectory('public/' . $token . '/cover/', $folderName . '/cover/');

but there's no different!!

This is where I found above solution.

Do you know how can I copy entire directory from one folder to another using laravel 5.4?

Thanks in Advance


Solution

  • More than one year later :)

    Use path helpers functions https://laravel.com/docs/5.6/helpers

    \File::copyDirectory( public_path . 'to/the/app', resource_path('to/the/app'));