- actions and notifications refactor (#88)

* wip

* fix

* fix

* fix

* add test

* fix

* wip

* fix

* fix translations

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
This commit is contained in:
Adrian Hopek
2022-03-21 15:29:20 +01:00
committed by GitHub
parent d8ac2bd61f
commit 95f5ed44d6
47 changed files with 537 additions and 1014 deletions

View File

@@ -1,22 +0,0 @@
<?php
declare(strict_types=1);
namespace Toby\Eloquent\Scopes;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
use Toby\Eloquent\Helpers\YearPeriodRetriever;
class SelectedYearPeriodScope implements Scope
{
public function __construct(
protected YearPeriodRetriever $yearPeriodRetriever,
) {}
public function apply(Builder $builder, Model $model): Builder
{
return $builder->where("year_period_id", $this->yearPeriodRetriever->selected()->id);
}
}