-
-
Save cursosdesarrolloweb/92c1cdbe506b28ce0a17cc651fdfeb6e to your computer and use it in GitHub Desktop.
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
<?php | |
use App\Models\Country; | |
use Illuminate\Support\Facades\Route; | |
Route::get('/through', function () { | |
$spainPosts = Country::with(["posts:user_id,title", "posts.user:id,name,country_id"])->whereName("Spain")->first(); | |
dd($spainPosts->posts); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment