mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Clean up API and display of transactions.
This commit is contained in:
@@ -52,4 +52,10 @@ class ALERepository implements ALERepositoryInterface
|
||||
|
||||
return $auditLogEntry;
|
||||
}
|
||||
|
||||
public function getForId(string $model, int $modelId): Collection
|
||||
{
|
||||
// all Models have an ID.
|
||||
return AuditLogEntry::where('auditable_id', $modelId)->where('auditable_type', $model)->get();
|
||||
}
|
||||
}
|
||||
|
@@ -45,6 +45,8 @@ use Illuminate\Support\Collection;
|
||||
interface ALERepositoryInterface
|
||||
{
|
||||
public function getForObject(Model $model): Collection;
|
||||
public function getForId(string $model, int $modelId): Collection;
|
||||
|
||||
|
||||
public function store(array $data): AuditLogEntry;
|
||||
}
|
||||
|
Reference in New Issue
Block a user