1234567891011121314151617181920212223 |
- <?php
- namespace Modules\ContentManage\Models;
- use Illuminate\Database\Eloquent\Builder;
- class BookCategories extends BaseModel
- {
- protected $table = 'book_categories';
- protected $fillable = [
- 'id', 'category_name', 'channel_id', 'channel_name', 'sequence', 'pid', 'is_show', 'created_at', 'updated_at',
- ];
- public function scopeShow(Builder $query): void
- {
- $query->where($this->table.'.is_show', 1);
- }
- }
|