Skip to content

Commit

Permalink
Removed functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ConsoleTVs committed May 2, 2017
1 parent 904acb4 commit cb6a513
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/Models/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,36 +31,6 @@ class View extends Model
'previous_url', 'next_url',
];

/**
* Return number of total views with same next_url than current view.
*/
public function countSameUrl($uniqueUsers = false)
{
$views = self::all()->where('next_url', $this->next_url);

return ($uniqueUsers) ? $views->unique('ip')->count() : $views->count();
}

/**
* Return number of total views with same browser than current view.
*/
public function countSameBrowser($uniqueUsers = false)
{
$views = self::all()->where('browser', $this->browser);

return ($uniqueUsers) ? $views->unique('ip')->count() : $views->count();
}

/**
* Return number of total views with same os than current view.
*/
public function countSameOs($uniqueUsers = false)
{
$views = self::all()->where('os', $this->os);

return ($uniqueUsers) ? $views->unique('ip')->count() : $views->count();
}

/**
* Add a view row to the database.
*/
Expand Down

0 comments on commit cb6a513

Please sign in to comment.