From 7b721496a8a61045b71ff05bf4d0713113e0a519 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Sat, 12 Oct 2024 15:37:53 +0500 Subject: [PATCH] wip --- app/Nova/Resources/Branch/Branch.php | 14 ++++++++ ...d_swift_billing_data_to_branches_table.php | 36 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 database/migrations/2024_10_12_153318_add_swift_billing_data_to_branches_table.php diff --git a/app/Nova/Resources/Branch/Branch.php b/app/Nova/Resources/Branch/Branch.php index 500e8ff..3fd4c8a 100644 --- a/app/Nova/Resources/Branch/Branch.php +++ b/app/Nova/Resources/Branch/Branch.php @@ -92,6 +92,20 @@ class Branch extends Resource ->rules('nullable', 'string', 'max:255') ->hideFromIndex(), + Text::make(__('Billing username (Swift)'), 'billing_swift_username') + ->rules('nullable', 'string', 'max:255'), + + Text::make(__('Billing password (Swift)'), 'billing_swift_password') + ->rules('nullable', 'string', 'max:255') + ->hideFromIndex(), + + Text::make(__('Billing username (Visa/Master)'), 'billing_visa_master_username') + ->rules('nullable', 'string', 'max:255'), + + Text::make(__('Billing password (Visa/Master)'), 'billing_visa_master_password') + ->rules('nullable', 'string', 'max:255') + ->hideFromIndex(), + Textarea::make(__('Address'), 'address'), Boolean::make(__('Active'), 'active') diff --git a/database/migrations/2024_10_12_153318_add_swift_billing_data_to_branches_table.php b/database/migrations/2024_10_12_153318_add_swift_billing_data_to_branches_table.php new file mode 100644 index 0000000..63bb416 --- /dev/null +++ b/database/migrations/2024_10_12_153318_add_swift_billing_data_to_branches_table.php @@ -0,0 +1,36 @@ +string('billing_swift_username')->nullable(); + $table->string('billing_swift_password')->nullable(); + + $table->string('billing_visa_master_username')->nullable(); + $table->string('billing_visa_master_password')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('branches', function (Blueprint $table) { + $table->dropColumn('billing_swift_username'); + $table->dropColumn('billing_swift_password'); + + $table->dropColumn('billing_visa_master_username'); + $table->dropColumn('billing_visa_master_password'); + }); + } +};