belongsTo( 'Projectemployee' ); } public static function saveProjecthour( $projecthourID, $projecthour ) { $projecthour = (array) $projecthour; if ( $projecthourID == 0 ) { $projecthour = Projecthour::create( $projecthour ); $projecthourID = $projecthour['id']; } else { Projecthour::whereId( $projecthourID )->update( $projecthour ); } return $projecthourID; } public static function removeProjecthour( $projecthourID ) { Projecthour::whereId( $projecthourID )->delete(); } }