Hello. Can someone help me. I am new in laravel. am currently using crestApps codegenerator. My problem is how to add foreign-keys relation between tables.
i need php artisan command to create a relation between three tables in crestApps codegenerator. the tables are:
Table 1: Department
with fields: dept_id, deptName, deptHead
with fields file_id, fileRefNo, fileName
Table 3: AddDoc
with fields: doc_id, docSubject, docRefNo, fileRefNo, deptName, deptHead.
my plan is that when filling the AddDoc form, the fileRefNo, deptName and deptHead should be selected from the Addfile and Dept tables respectively. That is a foreign-key relation is to be created between the three tables above. The JSON file will be created after the resource file command is run. Please, help. Thanks in advance. Regards.