* #44 - ui for summary * #44 - vacation monthly usage * #44 - fix * #44 - fix Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
		
			
				
	
	
		
			23 lines
		
	
	
		
			598 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			598 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| declare(strict_types=1);
 | |
| 
 | |
| namespace Toby\Infrastructure\Http\Controllers;
 | |
| 
 | |
| use Illuminate\Http\RedirectResponse;
 | |
| use Illuminate\Http\Request;
 | |
| use Toby\Eloquent\Helpers\YearPeriodRetriever;
 | |
| use Toby\Eloquent\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("info", __("Selected year period has been changed."));
 | |
|     }
 | |
| }
 |