So the way you described is certainly one possibility.
To create a one to many relationship, you'd add a project_id column to your files table:
Schema::table('files', function (Blueprint $table) {
$table->unsignedBigInteger('project_id');
$table->foreign('project_id')->references('id')->on('projects');
});
To make your naming less confusing, you might want to consider renaming the file_id column on your projects table to active_file_id.
From there, your Project model would need two relationships:
public function activeFile()
{
return $this->hasOne(File::class, 'id', 'active_file_id');
}
public function files()
{
return $this->hasMany(File::class);
}
Having an active_file_id column on the projects table would ensure there is only ever one active file for a project.
That said, you may alternatively consider adding an is_active boolean field to the files table instead. That would allow you to have multiple active files, if you choose, but you'd have to be more protective through checks if you wanted to make sure there is only ever one active file.