fixed payment method in transfer show
This commit is contained in:
parent
9fad0657e9
commit
cc8ca2a740
@ -4,6 +4,7 @@ namespace App\Abstracts\View\Components\Transfers;
|
||||
|
||||
use App\Abstracts\View\Component;
|
||||
use App\Traits\ViewComponents;
|
||||
use App\Utilities\Modules;
|
||||
|
||||
abstract class Show extends Component
|
||||
{
|
||||
@ -13,7 +14,9 @@ abstract class Show extends Component
|
||||
|
||||
public $transfer;
|
||||
|
||||
public $template;
|
||||
public array $payment_methods;
|
||||
|
||||
public string $template;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
@ -21,10 +24,11 @@ abstract class Show extends Component
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
$model = false, $transfer = false, string $template = ''
|
||||
$model = false, $transfer = false, array $payment_methods = [], string $template = ''
|
||||
) {
|
||||
$this->model = $model;
|
||||
$this->transfer = $this->getTransfer($model, $transfer);
|
||||
$this->payment_methods = ($payment_methods) ?: Modules::getPaymentMethods('all');
|
||||
$this->template = ! empty($template) ? $template : setting('transfer.template');
|
||||
|
||||
// Set Parent data
|
||||
|
@ -4,6 +4,7 @@ namespace App\Abstracts\View\Components\Transfers;
|
||||
|
||||
use App\Abstracts\View\Component;
|
||||
use App\Traits\ViewComponents;
|
||||
use App\Utilities\Modules;
|
||||
|
||||
abstract class Template extends Component
|
||||
{
|
||||
@ -13,7 +14,9 @@ abstract class Template extends Component
|
||||
|
||||
public $transfer;
|
||||
|
||||
public $template;
|
||||
public array $payment_methods;
|
||||
|
||||
public string $template;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
@ -21,10 +24,11 @@ abstract class Template extends Component
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
$model = false, $transfer = false, string $template = ''
|
||||
$model = false, $transfer = false, array $payment_methods = [], string $template = ''
|
||||
) {
|
||||
$this->model = $model;
|
||||
$this->transfer = $this->getTransfer($model, $transfer);
|
||||
$this->payment_methods = ($payment_methods) ?: Modules::getPaymentMethods('all');
|
||||
$this->template = ! empty($template) ? $template : setting('transfer.template');
|
||||
|
||||
// Set Parent data
|
||||
|
Loading…
x
Reference in New Issue
Block a user