Replies: 1 comment
-
| @w99910 are you able to solve it? | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I'm trying to implement belongsTo relationship with custom local key and foreign key.
Collection structure
posts
alerts
Expected behaviour
Here we will match accountId in posts collection and postId in alerts collection.
App\Models\Post
Actual behaviour
When I dd
App\Models\Alert::first()->alert, it returnsnull.Beta Was this translation helpful? Give feedback.
All reactions