From 9ce390c78046e50fd29b3dc0171bcc51fc902acf Mon Sep 17 00:00:00 2001 From: James Brooks Date: Tue, 25 Nov 2014 09:04:03 +0000 Subject: [PATCH] Relationship for incidents reported on the component --- app/models/Component.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/models/Component.php b/app/models/Component.php index c2087122..dea3e4de 100644 --- a/app/models/Component.php +++ b/app/models/Component.php @@ -1,6 +1,14 @@ hasMany('Incident', 'component_id', 'id'); + } + /** * Looks up the human readable version of the status. * @return string @@ -32,8 +40,7 @@ * * @return mixed */ - public function getTransformer() - { + public function getTransformer() { return new ComponentTransformer(); } }