I have two table one is called `Submission` one called `AssignSubmission`

`Submission` belongTo `AssignSubmission`

```
public function assignsubmission()
{
    return $this->belongsTo('App\AssignSubmission');
}

```

`AssignSubmission`hasMany`Submission`

```
public function submissions()
{
    return $this->hasMany('App\Submission');
}

```

They are linked with foreign keys 
In `AssignSubmission` has `id`, `user_id` and `submission_id` the foreign key is submission\_id.
In Submission table, it has `id`, `user_id` and `file`, `url` etc

in `AssignSubmission` `submission_id` -> links to -> `Submission` `id`.
I have assigned different submission to 2 users.
[![enter image description here](https://i.stack.imgur.com/KCLnh.png)](https://i.stack.imgur.com/KCLnh.png)

How can I get data from the foreign key?
I want to display the url or file in the view

[![enter image description here](https://i.stack.imgur.com/GLyKz.png)](https://i.stack.imgur.com/GLyKz.png)