1
From a question, I was given a way to make queries with children objects using the Join of the eloquent, The query is below:
$dados = Roda::join('veiculos', function($query) {
$query->on('veiculos.id', '=', 'rodas.veiculo_id');
$query->where('veiculo.cor', '=', 'vermelho');
})
->get();
However, now the need arises to hide fields that come in the object, and I do not know how to do this using the Join model that is seen above, the code solves another problem, that can not solve otherwise. Now it appears I need to hide fields, How can I do?
To close the question, I could provide the documentation where you are based to answer?
– Andersoney Rodrigues
http://laravel.com/docs - it is possible to notice that when I speak in methods I put links to their documentation.
– Jéf Bueno
On what page? because I couldn’t find anything you taught me in both posts. It could be a little more specific?
– Andersoney Rodrigues
Just use the search box. What do you need specification for? In both posts there are links to the exact pages that I consulted.
– Jéf Bueno