1
I’m doing a registration system using the Laravel 5, I created the client scheme, with some tables such as person, address, email, phone. happens I have another bank, called cep, where has some tables like street, us, neighborhood, city. I am very beginner in this framework, all I could do was imitate other ready-made models. The Register is working, both the search in the bank, and the inclusion. My question, how do I type the zip in an html and through this zip the input in the form fill in the fields of street, city, neighborhood, state? Thank you.
Note. I made this select in mysql, it worked, now I do not know how to implement in mysql
USE cep;
SELECT e.endereco_logradouro, b.bairro_descricao, c.cidade_descricao, u.uf_sigla, u.uf_descricao
FROM endereco e, bairro b, cidade c, uf u
WHERE e.bairro_codigo = b.bairro_codigo AND
b.cidade_codigo = c.cidade_codigo AND
c.uf_codigo = u.uf_codigo AND e.endereco_cep = 'variável'
You better configure the database in your application and use it in a specific model of
Laravel
. He already has his own abstraction, and it will save labor.– Wallace Maxters