public function getFirstWorkTelephone($id) {

        $people =  $this->model->findOrfail($id);

        // The first telephone number that is they type "work"
        foreach ($people->telephone as $telephone) {

            if ($telephone->telephone_type_id == 1) {
                return $telephone->title;
            }
        }

        return "there is no telephone number";
    }
public function getFirstWorkTelephone($id) {

        $people =  $this->model->findOrfail($id);

        // The first telephone number that is they type "work"
        foreach ($people->telephone as $telephone) {

            if ($telephone->telephone_type_id == 1) {
                return $telephone->title;
            }
        }

        return "there is no telephone number";
    }
public function getFirstWorkTelephone ( $ id ) { $ people = $ this -> model -> findOrfail ( $ id ) ; // The first telephone number that is they type "work" foreach ( $ people -> telephone as $ telephone ) { if ( $ telephone -> telephone_type_id == 1 ) { return $ telephone -> title ; } } return "there is no telephone number" ; }
Get the first work telephone number found for a specific People ID

@param    int    $id    PeopleID
@return   text
Get the first work telephone number found for a specific People ID