-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from cslant/update-like-model
Interaction of Like
- Loading branch information
Showing
6 changed files
with
91 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,38 @@ | ||
<?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', | ||
|
||
/* | ||
* User tables foreign key name. | ||
* The model class for the interaction table. | ||
*/ | ||
'user_foreign_key' => 'user_id', | ||
'interaction_model' => 'CSlant\LaravelLike\Models\Like', | ||
|
||
/* | ||
* The model and foreign key for the user relationship. | ||
*/ | ||
'users' => [ | ||
/* | ||
* User model class. | ||
* Use this to set the user model class for the user relationship. | ||
*/ | ||
'model' => 'App\Models\User', | ||
|
||
/* | ||
* User tables foreign key name. | ||
* Use this to set the foreign key name for the user relationship. | ||
*/ | ||
'foreign_key' => 'user_id', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
parameters: | ||
excludePaths: | ||
ignoreErrors: | ||
- message: '#Cannot cast mixed to string#' | ||
path: src/* | ||
|
||
- message: '#Method CSlant\\LaravelLike\\Models\\Like::user\(\) return type with generic class Illuminate\\Database\\Eloquent\\Relations\\BelongsTo does not specify its types: TRelatedModel, TChildModel#' | ||
path: src/Models/Like.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters