mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-19 04:49:30 +00:00
25 lines
460 B
PHP
25 lines
460 B
PHP
<?php
|
|
|
|
namespace Firefly\Storage\Budget;
|
|
|
|
|
|
class EloquentBudgetRepository implements BudgetRepositoryInterface
|
|
{
|
|
|
|
public function getAsSelectList()
|
|
{
|
|
$list = \Auth::user()->budgets()->get();
|
|
$return = [];
|
|
foreach ($list as $entry) {
|
|
$return[intval($entry->id)] = $entry->name;
|
|
}
|
|
return $return;
|
|
}
|
|
|
|
public function find($id)
|
|
{
|
|
|
|
return \Auth::user()->budgets()->find($id);
|
|
}
|
|
|
|
}
|