I have a table Admin(should have actully named it articles

) with the following fields:
Code: Select all
ID
title
keywords
blog_content
tag
filePath
slug
created_at
updated_at
And Then i have the Tags table with the following feilds:
Now i want to create a hasMany relationship between the Admin and the Tags table. How do i do this ? I mean which field in the Admin table will be the foreign key ? i believe usually the foreign key is always the ID field , even the docs show the same: HERE -->
https://laravel.com/docs/5.4/migrations ... onstraints , or should can i make the tag feild in the Admin table as the foreign key to the ID in the Tags table ?
I still have a scrambled brain about this issue and hence i taught it would be best to ask here, can somebody please give me a bit more clarity on this topic ?
Thank you.
Gautam.