Added debug info to the export routine.

This commit is contained in:
James Cole
2016-02-23 06:39:01 +01:00
parent 28fd719ce3
commit deeeb06488
8 changed files with 62 additions and 8 deletions

View File

@@ -3,7 +3,9 @@ declare(strict_types = 1);
namespace FireflyIII\Repositories\Attachment;
use Auth;
use FireflyIII\Models\Attachment;
use Illuminate\Support\Collection;
/**
* Class AttachmentRepository
@@ -26,9 +28,18 @@ class AttachmentRepository implements AttachmentRepositoryInterface
$file = $helper->getAttachmentLocation($attachment);
unlink($file);
$attachment->delete();
return true;
}
/**
* @return Collection
*/
public function get(): Collection
{
return Auth::user()->attachments()->get();
}
/**
* @param Attachment $attachment
* @param array $data

View File

@@ -4,6 +4,7 @@ declare(strict_types = 1);
namespace FireflyIII\Repositories\Attachment;
use FireflyIII\Models\Attachment;
use Illuminate\Support\Collection;
/**
* Interface AttachmentRepositoryInterface
@@ -20,6 +21,11 @@ interface AttachmentRepositoryInterface
*/
public function destroy(Attachment $attachment): bool;
/**
* @return Collection
*/
public function get(): Collection;
/**
* @param Attachment $attachment
* @param array $attachmentData