public function listByProject($id) { return ProjectEngine::where('project_id', $id)->get(); }
public function engines($id) { $project = Project::findOrFail($id); $engines = ProjectEngine::where('project_id', $id)->get(); return view('projects.engines', compact('engines', 'project')); }