PaymentMethod.php 434 B

1234567891011121314151617
  1. <?php
  2. namespace App\Models;
  3. class PaymentMethod extends Model
  4. {
  5. protected $table = 'payment_method';
  6. public function customer(){
  7. return $this->hasOne(Customer::class, 'id', 'customer_id');
  8. }
  9. public function displayName(){
  10. // $parsed = json_decode($this->stripe_detail_json);
  11. return "Ending: <b>{$this->card_last4}</b>; Expiry: {$this->expiration_month} / {$this->expiration_year}";
  12. }
  13. }