Learner\Repositories\Eloquent\BlogRepository::findAllWithRelation PHP Method

findAllWithRelation() public method

Find all blog with category.
public findAllWithRelation ( ) : Illuminate\Database\Eloquent\Collection | Blog[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\Blog[]
    public function findAllWithRelation()
    {
        return $this->model->with(static::$relations)->orderBy('is_top', 'DESC')->orderBy('is_published')->orderBy('created_at', 'DESC')->get();
    }