There are two tables, a table with streets, and a table with information about the house. I tried to join the tables using the street_id column in the houses table. The table works, I get the information. But now how can I make it so that when I click on the street / {ID} link, I get a list of houses that are located on it. As I understand it, it is necessary to add the code
public function getHouse()
{
$houses = Houses::where('street_id', $this->street_id)->get();
dd ($houses);
}
DD get it wait. Where did I go wrong?