HEX
Server: Apache
System: Linux 162-241-121-228.webhostbox.net 3.10.0-862.3.2.el7.x86_64 #1 SMP Mon May 21 23:36:36 UTC 2018 x86_64
User: apiuattsproject (10003)
PHP: 8.2.30
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uat-api.tsprojects.net/admin.plotterbox.tsprojects.net/app/Models/Subscription.php
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Subscription extends Model
{
    use HasFactory, SoftDeletes;

    /**
     * The table relationships name change from snake_case to camelCase.
     *
     * @var string
     */
    public static $snakeAttributes = false;

    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'tblSubscription';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'userId',
        'bookId',
        'customBookId',
        'saveForLater',
        'numberOfBooks',
        'fromEditor',
        'movedToCart',
    ];

    public function Books()
    {
        return $this->belongsTo(Books::class, 'bookId', 'id');
    }
    
    public function customBook()
    {
        return $this->belongsTo(CustomBook::class, 'customBookId', 'id');
    }
}