adrema/app/Contribution/ContributionController.php

21 lines
482 B
PHP
Raw Normal View History

2022-05-17 01:37:07 +02:00
<?php
namespace App\Contribution;
2022-11-17 21:47:45 +01:00
use App\Contribution\Documents\SolingenDocument;
2022-05-17 01:37:07 +02:00
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
2022-11-07 16:18:11 +01:00
use Zoomyboy\Tex\BaseCompiler;
use Zoomyboy\Tex\Tex;
2022-05-17 01:37:07 +02:00
class ContributionController extends Controller
{
2022-11-07 16:18:11 +01:00
public function generate(Request $request): BaseCompiler
2022-05-17 01:37:07 +02:00
{
2022-11-07 16:18:11 +01:00
/** @var class-string<SolingenDocument> */
$type = $request->query('type');
2022-05-17 01:37:07 +02:00
2022-11-07 16:18:11 +01:00
return Tex::compile($type::fromRequest($request));
2022-05-17 01:37:07 +02:00
}
}