original_string: protected function translateTimeslotId($oldTimeslotId)
      {
          $timeslot = ScoolTimeslot::where('order',Timeslot::findOrFail($oldTimeslotId)->order)->first();
          if ( $timeslot != null ) {
              return $timeslot->id;
          }
          throw new TimeslotNotFoundByNameException();
      }
code: protected function translateTimeslotId($oldTimeslotId)
      {
          $timeslot = ScoolTimeslot::where('order',Timeslot::findOrFail($oldTimeslotId)->order)->first();
          if ( $timeslot != null ) {
              return $timeslot->id;
          }
          throw new TimeslotNotFoundByNameException();
      }
code_tokens: protected function translateTimeslotId ( $ oldTimeslotId ) { $ timeslot = ScoolTimeslot :: where ( 'order' , Timeslot :: findOrFail ( $ oldTimeslotId ) -> order ) -> first ( ) ; if ( $ timeslot != null ) { return $ timeslot -> id ; } throw new TimeslotNotFoundByNameException ( ) ; }
docstring: Translate timeslot id.
  
  @param $oldTimeslotId
  @return mixed
  @throws TimeslotNotFoundByNameException
docstring_tokens: Translate timeslot id .