mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-29 02:11:12 -06: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;
|
|
|
|
}
|
|
} |