I load a model with
first and in an immediate dump the related data is present, but in the data passed to the view it's missing.
I create a demo here: github.com/michapietsch/laravel-eager-loading-missing-in-view-example
See how in
routes.web I use
Flight::with('passengers')->first() and uncomment the dump to verify that the passengers are present there. In the
ExampleTest I check for the data to be present and it's missing.
Am I missing something here?