Don't trigger update on view_count increase
This commit is contained in:
@@ -104,10 +104,11 @@ class Episode extends Model implements Sitemapable
|
|||||||
/**
|
/**
|
||||||
* Increment View Count.
|
* Increment View Count.
|
||||||
*/
|
*/
|
||||||
public function incrementViewCount(): bool
|
public function incrementViewCount(): void
|
||||||
{
|
{
|
||||||
$this->view_count++;
|
DB::table('episodes')
|
||||||
return $this->save();
|
->where('id', $this->id)
|
||||||
|
->update(['view_count' => $this->view_count + 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user