Use include for relations

This commit is contained in:
Joseph Cohen
2015-02-23 00:00:20 -06:00
parent 683dccbfac
commit cdd31ed05d
4 changed files with 61 additions and 13 deletions

View File

@@ -53,18 +53,6 @@ class ComponentController extends Controller
return $this->component->findOrFail($id);
}
/**
* Return a component with incidents.
*
* @param int $id
*
* @return \CachetHQ\Cachet\Models\Component
*/
public function getComponentIncidents($id)
{
return $this->component->with($id, ['incidents']);
}
/**
* Create a new component.
*