* - directory refactor * - readme.md update * Update readme.md Co-authored-by: Adrian Hopek <adrian.hopek@blumilk.pl> * Update readme.md Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com> * Update readme.md Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com> * Update readme.md Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com> * Update readme.md Co-authored-by: Adrian Hopek <adrian.hopek@blumilk.pl> Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com>
		
			
				
	
	
		
			23 lines
		
	
	
		
			600 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			600 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("success", __("Selected year period has been changed"));
 | |
|     }
 | |
| }
 |