Learner\Repositories\Eloquent\BlogRepository::findPublishedById PHP 메소드

findPublishedById() 공개 메소드

Get published blog by id.
public findPublishedById ( integer $id ) : Illuminate\Database\Eloquent\Collection | Blog[]
$id integer
리턴 Illuminate\Database\Eloquent\Collection | Learner\Models\Blog[]
    public function findPublishedById($id)
    {
        return $this->model->where('is_published', 1)->whereId($id)->firstOrFail();
    }