23 lines
		
	
	
		
			532 B
		
	
	
	
		
			PHP
		
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			532 B
		
	
	
	
		
			PHP
		
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Payment;
 | |
| 
 | |
| use App\Letter\DocumentFactory;
 | |
| use Illuminate\Support\Collection;
 | |
| 
 | |
| class ActionFactory
 | |
| {
 | |
|     public function allLinks(): Collection
 | |
|     {
 | |
|         return app(DocumentFactory::class)->getTypes()->map(function ($repo) {
 | |
|             return [
 | |
|                 'link' => [
 | |
|                     'href' => route('sendpayment.pdf', ['type' => $repo]),
 | |
|                     'label' => $repo::sendAllLabel(),
 | |
|                 ],
 | |
|                 'text' => $repo::getDescription(),
 | |
|             ];
 | |
|         });
 | |
|     }
 | |
| }
 |