Ejemplo n.º 1
0
 /**
  * Returns a template by slug.
  *
  * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
  *
  * @return \CachetHQ\Cachet\Models\IncidentTemplate
  */
 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.");
 }