Use include for relations
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user