Hello
New to Laravel (it’s great).
I have made a (scheduled) artisan command using Indus/dispatcher. In its fire method i do 2 things: 1/ delete some records from the db 2/ delete a directory on the filesystem in “website/public/repo/DIRECTORYIWANTTODELETE”.
Now, deleting data works fine, but the File::deleteDirectory does not. The below statement returns false: File::deleteDirectory('repo/' . $value->id);
Any ideas why the deleteDirectory returns false? How can i debug this?
(Im running Laravel on a homestead vagrant box on a mac.)
Cheers! Pieter.
Extra info: if i run the artisan command from the command line, the sql query executes and the directory gets deleted. However, when the cronjob runs, only the sql query is executed, but the directory is not deleted.
I've tried the paths:
Both work via command line, but no luck when cron does it. Can it be a permission issue? Where is de logging info for the operation?
Cheers, Pieter.
solved it ... indeed path problem (in the process i discovered the logging function, and some helpers :-)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community