how to add foreign-key relation on crestAppsCodegenerator with laravel

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

Table 2:Addfile

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.

You’re more likely to get a response from the Laravel team if you ask your question via Stack Overflow, as they state:

If you need support, please use Stack Overflow using laravel-code-generator
tag (https://stackoverflow.com/questions/tagged/laravel-code-generator)