@Mdp85 You sure you have the file's path correct? It is usually as simple as:
// Delete a single file
File::delete($filename);
// Delete multiple files
File::delete($file1, $file2, $file3);
// Delete an array of files
$files = array($file1, $file2);
File::delete($files);
//Example above from: http://laravel-recipes.com/recipes/133/deleting-a-file
//To lazy to type out myself :)
I think it is because it starts from a different directory, don't quote me on that tho.
Also make sure you mark one of these answers correctly just in case someone in the future is having the same problem as you are.
i guess the problem is that you have defined and using your own App\File class and this will conflict some way with the built in File facade...
try doing something like this:
// you have this
use App\File;
// add this
use Illuminate\Support\Facades\File as LaraFile;
class FileController extends Controller
{
public function destroy($id) {
LaraFile::delete("path/{$filename}");
}
}