Enabled/Improved links to relationships

This commit is contained in:
Deon George
2016-07-01 14:37:55 +10:00
parent b8be45b42c
commit ad10cb32ce
5 changed files with 57 additions and 23 deletions

View File

@@ -39,10 +39,12 @@ class PhotoDelete extends Job implements ShouldQueue
}
// Remove tags;
// @todo
if ($this->photo->Tags->count())
$this->photo->Tags()->detach();
// Remove People;
// @todo
if ($this->photo->People->count())
$this->photo->People()->detach();
// Make sure our parent is writable
if (! is_writable(dirname($this->photo->file_path())))