0
Creating my Migrations in Laravel I came up with the following question:
I have these two tables:
Used
- ID
- NOME_MARCA_ID
- MODEL
- YEAR
BRANDS
- ID
- NAME
in Migration to keep the brand ID I would do so:
$table->integer('marca_id')->unsigned();
$table->foreign('marca_id')->references('id')->on('marcas');
All information is saved through a form. And if I want to save in the table USADOS
, in the column NOME_MARCA_ID
the Nome
and not the ID
would be possible?