Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Amalmax's avatar

Filter Table Data in Laravel

I have following 2 tables in My DB

students
project_id               student_id
          1                                   2
           2                                  3
           5                                 4                   etc
permission
status           project_id             student_id
      1                            1                                  2
       2                           2                                   3
       3                            5                                   4

in both tables My project_id and student_id data same so I need save project_id and student_id data in permission table automaticaly from student table when I select status. how can I do this in My controller function.

0 likes
1 reply
Amalmax's avatar

I mean how to copy table column data to another table column....

Please or to participate in this conversation.