diff --git a/app/Modules/VisaMasterPaymentOrder/Nova/Resources/NovaVisaMasterPaymentOrder.php b/app/Modules/VisaMasterPaymentOrder/Nova/Resources/NovaVisaMasterPaymentOrder.php index ea2bd51..713a0e6 100644 --- a/app/Modules/VisaMasterPaymentOrder/Nova/Resources/NovaVisaMasterPaymentOrder.php +++ b/app/Modules/VisaMasterPaymentOrder/Nova/Resources/NovaVisaMasterPaymentOrder.php @@ -344,7 +344,7 @@ class NovaVisaMasterPaymentOrder extends Resource ), ]), - // HasMany::make(__('Payment items'), 'paymentItems', ), + HasMany::make(__('Payment items'), 'paymentItems', NovaVisaMasterPaymentOrderItem::class), ]; } diff --git a/app/Modules/VisaMasterPaymentOrder/Nova/Resources/NovaVisaMasterPaymentOrderItem.php b/app/Modules/VisaMasterPaymentOrder/Nova/Resources/NovaVisaMasterPaymentOrderItem.php new file mode 100644 index 0000000..45e8e4a --- /dev/null +++ b/app/Modules/VisaMasterPaymentOrder/Nova/Resources/NovaVisaMasterPaymentOrderItem.php @@ -0,0 +1,111 @@ + + */ + public static $model = \App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrderItem::class; + + /** + * The single value that should be used to represent the resource when being displayed. + * + * @var string + */ + public static $title = 'id'; + + /** + * The columns that should be searched. + * + * @var array + */ + public static $search = [ + 'id', + ]; + + /** + * The relationships that should be eager loaded on index queries. + * + * @var array + */ + // public static $with = ['branch']; + + /** + * Indicates whether the resource should automatically poll for new resources. + * + * @var bool + */ + public static $polling = true; + + /** + * The interval at which Nova should poll for new resources. + * + * @var int + */ + public static $pollingInterval = 30; + + /** + * Indicates whether to show the polling toggle button inside Nova. + * + * @var bool + */ + public static $showPollingToggle = true; + + /** + * Get the displayable label of the resource. + */ + public static function label(): string + { + return __('Payments'); + } + + /** + * Get the displayable singular label of the resource. + */ + public static function singularLabel(): string + { + return __('Payment'); + } + + /** + * Get the fields displayed by the resource. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function fields(NovaRequest $request): array + { + return [ + ID::make(), + ]; + } + + /** + * Actions + */ + public function actions(NovaRequest $request): array + { + return [ + MakePaymentNovaVisaMaster::make() + ->icon('credit-card') + ->sole(), + ]; + } +} diff --git a/app/Nova/Actions/CheckOnlinePayment.php b/app/Nova/Actions/CheckOnlinePayment.php index 3b49f73..973ed9f 100644 --- a/app/Nova/Actions/CheckOnlinePayment.php +++ b/app/Nova/Actions/CheckOnlinePayment.php @@ -85,7 +85,7 @@ class CheckOnlinePayment extends Action /** * Result html * - * @param $response + * @param $response */ public function resultHTML($response) {