Skip to content

Commit

Permalink
chore: change the comment to clear the interaction model
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Sep 26, 2024
1 parent 5a971b0 commit a24fce8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions config/like.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

return [
'name' => 'Like',
'name' => 'The interactions configuration',

/*
* The flag to determine if the likes table should use UUIDs.
* If you want to use UUIDs instead of auto-incrementing integers for your likes table, set this to true.
* The flag to determine if the interactions table should use UUIDs.
* If you want to use UUIDs instead of auto-incrementing integers for your interactions table, set this to true.
*/
'is_uuids' => false,

/*
* The table name for likes records.
* The table name for interaction records.
*/
'table_name' => 'likes',

Expand Down
4 changes: 2 additions & 2 deletions src/Models/Like.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ public function isLove(): bool
* Scope a query to only include records of a given model type.
*
* @param Builder $query
* @param string $modelType
* @param string $modelType The model type. E.g. App\Models\Post::class
*
* @return Builder
*/
public function scopeWithModelType(Builder $query, string $modelType): Builder
{
// Use with likes() relationship. Can't use with likeOne() relationship.
return $query->where('model_type', app($modelType)->getMorphClass());
return $query->where('model_type', $modelType);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/InteractionRelationship.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
trait InteractionRelationship
{
/**
* Like has one relationship with the model.
* Interaction has one relationship with the model.
*
* @return MorphOne
*/
Expand All @@ -29,7 +29,7 @@ public function likeOne(): MorphOne
}

/**
* Like has many relationship with the model.
* Interaction has many relationship with the model.
*
* @return MorphMany
*/
Expand Down

0 comments on commit a24fce8

Please sign in to comment.