28 lines
515 B
PHP
28 lines
515 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Subscriptions extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'subscriptions';
|
|
protected $guarded = [];
|
|
|
|
|
|
public function subscription()
|
|
{
|
|
return $this->belongsTo(IamPrincipal::class, 'iam_principal_xid', 'id');
|
|
}
|
|
|
|
|
|
|
|
public function iamPrincipal()
|
|
{
|
|
return $this->belongsTo(IamPrincipal::class, 'iam_principal_xid', 'id');
|
|
}
|
|
}
|