Suppose we have many to one relationship between table A and table B. Now there are two possibilities to define this relation in Laravel.
while creating migration I use the "References" Keyword. and the run the migration
The other way is I use hasMany and belongsTo in model class corresponding to those tables and do not mention References and all in migration tables.
Can some one help me in understanding what approach I should follow. Or we need to have both the approach in our codebase to create relationships. Can some one throw some light on it. I am kind of confused. I am new to Laravel and learning these intricacies. thank you.