There's a ready conception for that purpose, you don't need that third model. What you need is a two sided many to many relationship with a pivot table attribute. The third table results you have shown is exactly 1:1 the pivot table of the file-field many to many relationship. Check out the documentation: https://laravel.com/docs/5.8/eloquent-relationships#many-to-many you'll find examples. But in general what you'd need is:
File.php
public function fields()
{
return $this->belongsToMany(Field::class)->withPivot('content');
}
Field.php
public function files()
{
return $this->belongsToMany(File::class)->withPivot('content');
}
whereas the pivot table (conventionally named field_file) must contain the following columns as you've shown:
id | file_id | field_id | content
1 | 1 | 1 | #1234
2 | 2 | 1 | #8888