Add Document/Transaction/Contact types to the config

This commit is contained in:
Burak Çakırel
2021-01-05 23:22:38 +03:00
parent 1deff6e5b4
commit 3aa94bc9e2
14 changed files with 130 additions and 147 deletions

View File

@ -28,7 +28,7 @@ class Document extends FormRequest
{
$type = $this->request->get('type', Model::INVOICE_TYPE);
$type = Str::replaceFirst('-', '_', $type);
$type = config("type.{$type}.route_parameter");
// Check if store or update
if ($this->getMethod() == 'PATCH') {