Posts by Wilson Junior • 21 points
4 posts
-
0
votes6
answers40933
viewsA: Does ternary surgery exist in Python?
An interesting way to do it is also: ('impar', 'par')[x%2==0] It’s even simpler in my opinion
-
1
votes1
answer1055
viewsA: Delete data with regards Many to Many in Laravel
Guys, I was able to solve the problem using onDelete('Cascade') in Migrations was the following: $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade') I…
-
0
votes1
answer1055
viewsQ: Delete data with regards Many to Many in Laravel
I’m having a problem deleting associated data in Laravel. I have user tables, records and tags. As you can see the table users connects with records, while a pivot table (registro_has_tags) connects…
-
0
votes0
answers63
viewsQ: Primary key transfer to foreign key - PHP
I am having a problem entering data into my database. I have two connected tables, company and information. STRUCTURE OF THE COMPANY TABLE CREATE TABLE IF NOT EXISTS `empresa` ( `empresa_id` int(11)…