mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 19:01:58 +00:00
32 lines
661 B
PHP
32 lines
661 B
PHP
![]() |
<?php
|
||
|
|
||
|
namespace FireflyIII\Repositories\Attachment;
|
||
|
|
||
|
use FireflyIII\Models\Attachment;
|
||
|
|
||
|
/**
|
||
|
* Class AttachmentRepository
|
||
|
*
|
||
|
* @package FireflyIII\Repositories\Attachment
|
||
|
*/
|
||
|
class AttachmentRepository implements AttachmentRepositoryInterface
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* @param Attachment $attachment
|
||
|
* @param array $data
|
||
|
*
|
||
|
* @return Attachment
|
||
|
*/
|
||
|
public function update(Attachment $attachment, array $data)
|
||
|
{
|
||
|
|
||
|
$attachment->title = $data['title'];
|
||
|
$attachment->description = $data['description'];
|
||
|
$attachment->notes = $data['notes'];
|
||
|
$attachment->save();
|
||
|
|
||
|
return $attachment;
|
||
|
|
||
|
}
|
||
|
}
|