mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Added debug info to the export routine.
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user