Creating my migrations in Laravel I had the following doubt:
I have these two tables:
Used
- ID
- MARK_NAME_ID
- MODEL
- YEAR
TRADEMARKS
- ID
- NAME
migration to save the tag ID I would do so:
$table->integer('marca_id')->unsigned();
$table->foreign('marca_id')->references('id')->on('marcas');
All information is stored through a form. And if I want to save USADOS
to column NOME_MARCA_ID
Nome
and not ID
would be possible?