Skip to content

Commit

Permalink
fix: add missing s
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrildewit committed Mar 16, 2020
1 parent 0079b76 commit e166188
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -151,18 +151,18 @@ If you prefer to register packages manually, you can add the following provider
To associate views with a model, the model **must** implement the following interface and trait:

* **Interface:** `CyrildeWit\EloquentViewable\Contracts\Viewable`
* **Trait:** `CyrildeWit\EloquentViewable\InteractWithViews`
* **Trait:** `CyrildeWit\EloquentViewable\InteractsWithViews`

Example:

```php
use Illuminate\Database\Eloquent\Model;
use CyrildeWit\EloquentViewable\InteractWithViews;
use CyrildeWit\EloquentViewable\InteractsWithViews;
use CyrildeWit\EloquentViewable\Contracts\Viewable;

class Post extends Model implements Viewable
{
use InteractWithViews;
use InteractsWithViews;

// ...
}
Expand Down
4 changes: 2 additions & 2 deletions src/InteractWithViews.php
Expand Up @@ -14,14 +14,14 @@
* @method static self|Builder orderByViews(string $direction = 'desc', $period = null, string $collection = null, bool $unique = false, $as = 'views_count')
* @method static self|Builder orderByUniqueViews(string $direction = 'desc', $period = null, string $collection = null, string $as = 'unique_views_count')
**/
trait InteractWithViews
trait InteractsWithViews
{
/**
* Viewable boot logic.
*
* @return void
*/
public static function bootInteractWithViews()
public static function bootInteractsWithViews()
{
static::observe(ViewableObserver::class);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/TestClasses/Models/Apartment.php
Expand Up @@ -5,12 +5,12 @@
namespace CyrildeWit\EloquentViewable\Tests\TestClasses\Models;

use CyrildeWit\EloquentViewable\Contracts\Viewable;
use CyrildeWit\EloquentViewable\InteractWithViews;
use CyrildeWit\EloquentViewable\InteractsWithViews;
use Illuminate\Database\Eloquent\Model;

class Apartment extends Model implements Viewable
{
use InteractWithViews;
use InteractsWithViews;

/**
* The table associated with the model.
Expand Down
4 changes: 2 additions & 2 deletions tests/TestClasses/Models/Post.php
Expand Up @@ -5,12 +5,12 @@
namespace CyrildeWit\EloquentViewable\Tests\TestClasses\Models;

use CyrildeWit\EloquentViewable\Contracts\Viewable;
use CyrildeWit\EloquentViewable\InteractWithViews;
use CyrildeWit\EloquentViewable\InteractsWithViews;
use Illuminate\Database\Eloquent\Model;

class Post extends Model implements Viewable
{
use InteractWithViews;
use InteractsWithViews;

/**
* The table associated with the model.
Expand Down

0 comments on commit e166188

Please sign in to comment.