$this->subscription_id, 'subscription' => new SubscriptionResource($this->whenLoaded('subscription')), 'status_name' => $this->status->name, 'status_id' => $this->status->id, 'nr' => $this->nr, 'id' => $this->id, 'is_accepted' => $this->status->isAccepted(), 'links' => [ 'update' => route('member.payment.update', ['payment' => $this->getModel(), 'member' => $this->getModel()->member]), 'destroy' => route('member.payment.destroy', ['payment' => $this->getModel(), 'member' => $this->getModel()->member]), ] ]; } /** * @return array */ public static function memberMeta(Member $member): array { return [ 'statuses' => Status::forSelect(), 'subscriptions' => Subscription::forSelect(), 'default' => [ 'nr' => '', 'subscription_id' => null, 'status_id' => null ], 'links' => [ 'store' => route('member.payment.store', ['member' => $member]), ] ]; } }