Good afternoon everyone. I created a migration "clients" in the laravel that receives 3 foreign keys coming from entities: modalities, requests and locals.
In my view when registering a client and viewing in phpmyadmin I see that all the data is saved with their respective names, however in this my clients table, the modal, request and locals columns are saved only the id.
For example:
In the mode select the user chooses the first select item that is Special.
In the select of orders the user chooses the second item of the select that is Varied.
In the select of locals the user chooses the third item of the select that is São Paulo.
If I go there in phpmyadmin to see how it was in the register you will be in these columns respectively: 1, 2 and 3.
Is it anyway or am I doing something wrong so the name is not appearing?My clients migration looks like this:
$table->increments('id');
$table->string('nome_cliente',80);
$table->string('email_cliente',80)->unique();
$table->string('endereco',50);
$table->string('situacao',20);
$table->integer('modalidade_id')->unsigned();
$table->foreign('modalidade_id')->references('id')->on('modalidades');
$table->integer('pedido_id')->unsigned();
$table->foreign('pedido_id')->references('id')->on('pedidos');
$table->integer('locals_id')->unsigned();
$table->foreign('locals_id')->references('id')->on('locals');
$table->softDeletes();
$table->timestamps();