Skip to content

Conversation

@adereksisusanto
Copy link

No description provided.

adereksisusanto and others added 2 commits October 27, 2023 17:21
Delete Config
'relation_name_strategy' => 'related_with_foreign_key_and_local_key',

Create Config
'relation' => [
    'options' => [
        /*
        | 'true'        return $this->belongsTo(User::class, 'user_id', 'id'); (post.user_id --> user.id)
        |               return $this->hasMany(Comment::class, 'post_id', 'id'); (comment.post_id --> post.id)
        |
        | 'false'       return $this->belongsTo(User::class); (post.user_id --> user.id)
        |               return $this->hasMany(Comment::class); (comment.post_id --> post.id)
        */
        'show_key' => false, // default: false
    ]
],
@adereksisusanto adereksisusanto changed the title Create new relation_name_strategy Create new config relation Oct 30, 2023
@Benjaminhu
Copy link

@adereksisusanto I don't think it's worth changing the code formatting because it causes too many changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants