From 5ae0478484e5348f88d045eddee8f6a0a3f18ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sat, 4 Jun 2022 20:20:31 +0300 Subject: [PATCH] fixed tests --- app/Http/Requests/Banking/Transaction.php | 2 +- config/type.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Http/Requests/Banking/Transaction.php b/app/Http/Requests/Banking/Transaction.php index 3a7522b30..9a3150571 100644 --- a/app/Http/Requests/Banking/Transaction.php +++ b/app/Http/Requests/Banking/Transaction.php @@ -21,7 +21,7 @@ class Transaction extends FormRequest // Check if store or update if ($this->getMethod() == 'PATCH') { - $model = $this->isApi() ? 'document' : $type; + $model = $this->isApi() ? 'transaction' : $type; $id = is_numeric($this->$model) ? $this->$model : $this->{$model}->getAttribute('id'); } else { diff --git a/config/type.php b/config/type.php index c27514990..2eb1e039b 100644 --- a/config/type.php +++ b/config/type.php @@ -290,8 +290,8 @@ return [ 'group' => 'banking', 'route' => [ 'prefix' => 'transactions', // core use with group + prefix, module ex. estimates - 'parameter' => 'income', // sales/invoices/{parameter}/edit - //'create' => 'invoices.create', // if you change route, you can write full path + 'parameter' => 'transaction', // banking/transactions/{parameter}/edit + //'create' => 'transactions.create', // if you change route, you can write full path ], 'permission' => [ 'prefix' => 'transactions', @@ -316,8 +316,8 @@ return [ 'group' => 'banking', 'route' => [ 'prefix' => 'recurring-transactions', // core use with group + prefix, module ex. estimates - 'parameter' => 'recurring_transaction', // sales/invoices/{parameter}/edit - //'create' => 'invoices.create', // if you change route, you can write full path + 'parameter' => 'recurring_transaction', // banking/recurring-transactions/{parameter}/edit + //'create' => 'transactions.create', // if you change route, you can write full path ], 'permission' => [ 'prefix' => 'transactions', @@ -344,8 +344,8 @@ return [ 'group' => 'banking', 'route' => [ 'prefix' => 'transactions', // core use with group + prefix, module ex. estimates - 'parameter' => 'expense', // sales/invoices/{parameter}/edit - //'create' => 'invoices.create', // if you change route, you can write full path + 'parameter' => 'transaction', // banking/transactions/{parameter}/edit + //'create' => 'transactions.create', // if you change route, you can write full path ], 'permission' => [ 'prefix' => 'transactions', @@ -369,8 +369,8 @@ return [ 'group' => 'banking', 'route' => [ 'prefix' => 'recurring-transactions', // core use with group + prefix, module ex. estimates - 'parameter' => 'recurring_transaction', // sales/invoices/{parameter}/edit - //'create' => 'invoices.create', // if you change route, you can write full path + 'parameter' => 'recurring_transaction', // banking/recurring-transactions/{parameter}/edit + //'create' => 'transactions.create', // if you change route, you can write full path ], 'permission' => [ 'prefix' => 'transactions',