/home/techb158/ileadtechnology.com/SSM/app/Models/library
Edit: /home/techb158/ileadtechnology.com/SSM/app/Models/library/BookLogDetail.php (1655B)
'array', 'date_of_return' => 'date'];
protected $primaryKey = 'id';
protected $table = 'book_log_details';
protected static $logName = 'book_log_detail';
protected static $logFillable = true;
protected static $logOnlyDirty = true;
protected static $ignoreChangedAttributes = ['updated_at'];
public function bookLog()
{
return $this->belongsTo('App\Models\Library\BookLog');
}
public function bookPostDetail()
{
return $this->belongsTo('App\Models\Library\BookPostDetail');
}
public function scopeFilterById($q, $id)
{
if (! $id) {
return $q;
}
return $q->where('id', '=', $id);
}
public function scopeFilterByBookLogId($q, $book_post_id)
{
if (! $book_post_id) {
return $q;
}
return $q->where('book_post_id', '=', $book_post_id);
}
}