original_string: public function getIncidentTemplate()
      {
          $templateSlug = Binput::get('slug');
  
          if ($template = IncidentTemplate::where('slug', '=', $templateSlug)->first()) {
              return $template;
          }
  
          throw new ModelNotFoundException("Incident template for $templateSlug could not be found.");
      }
code: public function getIncidentTemplate()
      {
          $templateSlug = Binput::get('slug');
  
          if ($template = IncidentTemplate::where('slug', '=', $templateSlug)->first()) {
              return $template;
          }
  
          throw new ModelNotFoundException("Incident template for $templateSlug could not be found.");
      }
code_tokens: public function getIncidentTemplate ( ) { $ templateSlug = Binput :: get ( 'slug' ) ; if ( $ template = IncidentTemplate :: where ( 'slug' , '=' , $ templateSlug ) -> first ( ) ) { return $ template ; } throw new ModelNotFoundException ( "Incident template for $templateSlug could not be found." ) ; }
docstring: Returns a template by slug.
  
  @throws \Illuminate\Database\Eloquent\ModelNotFoundException
  
  @return \CachetHQ\Cachet\Models\IncidentTemplate
docstring_tokens: Returns a template by slug .