File: /var/www/vhosts/uat-api.tsprojects.net/admin.plotterbox.tsprojects.net/app/Models/BooksGenre.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class BooksGenre extends Model
{
use HasFactory, SoftDeletes;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'tblBooksGenre';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['bookId', 'genreId', 'createdBy'];
/**
* The table relationships name change from snake_case to camelCase.
*
* @var string
*/
public static $snakeAttributes = false;
/**
* Get the tblGenres data.
*/
public function genre()
{
return $this->belongsTo(Genre::class, 'genreId', 'id');
}
}