| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- class ClientPaymentMethod extends Model
- {
- use HasFactory, SoftDeletes;
- protected $fillable = [
- 'client_id',
- 'card_number',
- 'holder_name',
- 'expiration',
- 'cvv',
- 'card_name',
- 'brand',
- 'last_four_digits',
- 'is_active',
- ];
- protected $casts = [
- 'card_number' => 'encrypted',
- 'cvv' => 'encrypted',
- 'is_active' => 'boolean',
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
- protected $hidden = [
- // 'card_number',
- 'cvv',
- ];
- public function client(): BelongsTo
- {
- return $this->belongsTo(Client::class);
- }
- }
|