<?php

namespace App\Models\Traits;

use App\Enums\PublishStatusType;
use App\Utils\Helper;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletes;

trait Published
{
  public function scopePublished(Builder $query): Builder
  {
    $query->where('status', PublishStatusType::Publish);
    return $query;
  }
}
