This commit is contained in:
Adrian Hopek
2022-01-21 15:17:59 +01:00
parent a62a428781
commit 558dd27fee
25 changed files with 2563 additions and 183 deletions

View File

@@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Toby\Http\Controllers;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Toby\Helpers\YearPeriodRetriever;
use Toby\Models\YearPeriod;
class SelectYearPeriodController extends Controller
{
public function __invoke(Request $request, YearPeriod $yearPeriod): RedirectResponse
{
$request->session()->put(YearPeriodRetriever::SESSION_KEY, $yearPeriod->id);
return redirect()
->back()
->with("success", __("Selected year period has been changed"));
}
}