*/ 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(), Text::make('Amaly geçiren raýatyň F.A.A.', 'payer_name'), Text::make('Amaly geçiren raýatyň kart belgisi (mask)', 'payer_card'), Text::make('Töleg ýyly', fn () => $this->created_at->format('Y')), Text::make('Töleg aýy', fn () => $this->created_at->translatedFormat('F')), Text::make('Amalyň geçirilen wagty', fn () => $this->created_at->format('H:i, d.m.Y')), Text::make('Amalyň möçberi', fn () => $this->usd_payment_amount.' USD'), Text::make('Amalyň manat möçberi', fn () => $this->tmt_payment_amount.' TMT'), Text::make('Amalyň referensi', fn () => $this->payment_order_number), Boolean::make('paid'), ]; } /** * Actions */ public function actions(NovaRequest $request): array { return []; } }