From 15b69e38995fca7c1e584671edbb339805570e73 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Sat, 12 Oct 2024 15:41:49 +0500 Subject: [PATCH] Branch --- app/Nova/Resources/Branch/Branch.php | 45 +++++++++++++++------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/app/Nova/Resources/Branch/Branch.php b/app/Nova/Resources/Branch/Branch.php index 3fd4c8a..882286c 100644 --- a/app/Nova/Resources/Branch/Branch.php +++ b/app/Nova/Resources/Branch/Branch.php @@ -14,6 +14,7 @@ use Laravel\Nova\Fields\Select; use Laravel\Nova\Fields\Text; use Laravel\Nova\Fields\Textarea; use Laravel\Nova\Http\Requests\NovaRequest; +use Laravel\Nova\Panel; use Laravel\Nova\Resource; class Branch extends Resource @@ -85,31 +86,33 @@ class Branch extends Resource Text::make(__('Unique code'), 'unique_code') ->rules('required', 'string', 'max:255'), - Text::make(__('Billing username'), 'billing_username') - ->rules('nullable', 'string', 'max:255'), - - Text::make(__('Billing password'), 'billing_password') - ->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') ->default(true), + + new Panel(__('Billing'), [ + Text::make(__('Billing username'), 'billing_username') + ->rules('nullable', 'string', 'max:255'), + + Text::make(__('Billing password'), 'billing_password') + ->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(), + ]) ]; }