Skip to content

Commit d08bb0d

Browse files
committed
Bug Fixes
1 parent d40146e commit d08bb0d

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/Model/Tag.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
/**
77
* Copyright (C) 2014 Robert Conner
88
*/
9-
class Tag extends Eloquent {
10-
9+
class Tag extends Eloquent
10+
{
1111
protected $table = 'tagging_tags';
1212
public $timestamps = false;
1313
protected $softDelete = false;

src/Model/Tagged.php

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class Tagged extends Eloquent
1111
protected $table = 'tagging_tagged';
1212
public $timestamps = false;
1313
protected $fillable = ['tag_name', 'tag_slug'];
14+
protected $taggingUtility;
1415

1516
public function __construct(array $attributes = array())
1617
{

src/Taggable.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php namespace Conner\Tagging;
22

3-
use Illuminate\Support\Facades\Config;
4-
use Illuminate\Database\Eloquent\Collection;
5-
use Conner\Tagging\Model\Tagged;
63
use Conner\Tagging\Contracts\TaggingUtility;
7-
use Conner\Tagging\Events\TagRemoved;
84
use Conner\Tagging\Events\TagAdded;
5+
use Conner\Tagging\Events\TagRemoved;
6+
use Conner\Tagging\Model\Tagged;
7+
use Illuminate\Database\Eloquent\Collection;
8+
use Illuminate\Support\Facades\Config;
99

1010
/**
1111
* Copyright (C) 2014 Robert Conner

src/Util.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function incrementCount($tagString, $tagSlug, $count)
165165
$tag = $model::where('slug', '=', $tagSlug)->first();
166166

167167
if(!$tag) {
168-
$tag = new Tag;
168+
$tag = new $model;
169169
$tag->name = $tagString;
170170
$tag->slug = $tagSlug;
171171
$tag->suggest = false;
@@ -214,7 +214,7 @@ public function deleteUnusedTags()
214214
/**
215215
* @return string
216216
*/
217-
public static function tagModelString()
217+
public function tagModelString()
218218
{
219219
return config('tagging.tag_model', '\Conner\Tagging\Model\Tag');
220220
}

0 commit comments

Comments
 (0)