fix: correct polymorphic relations in comment, favorite and payment models
This commit is contained in:
+22
-17
@@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Payment
|
||||
*
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $payable_id
|
||||
@@ -26,22 +26,27 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Payment extends Model
|
||||
{
|
||||
protected $table = 'payments';
|
||||
public static $snakeAttributes = false;
|
||||
protected $table = 'payments';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'payable_id' => 'int',
|
||||
'amount' => 'float',
|
||||
'status' => 'int'
|
||||
];
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'payable_id' => 'int',
|
||||
'amount' => 'float',
|
||||
'status' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'payable_id',
|
||||
'amount',
|
||||
'authority',
|
||||
'transaction_id',
|
||||
'status'
|
||||
];
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'payable_id',
|
||||
'amount',
|
||||
'authority',
|
||||
'transaction_id',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user