Last active
January 13, 2019 21:24
-
-
Save winni4eva/4b4c6c8a563034e89ca8f4da53042a76 to your computer and use it in GitHub Desktop.
Explicit Binding With Model Relationships
This file contains hidden or 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
<?php | |
$router->get('/users/{user}', function ($resolvedUser) { | |
$user = $resolvedUser->load('posts'); | |
dd($user); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment