Fewo/ PDFs / Mails v3

This commit is contained in:
Kevin Adametz 2019-05-06 20:21:40 +02:00
parent 7abfe3f700
commit e537e47a82
44 changed files with 2112 additions and 527 deletions

View file

@ -112,4 +112,27 @@ class CMSContent extends Model
}
public static function getContentBySlug($slug){
$CMSContent = CMSContent::whereSlug(trim($slug))->first();
if($CMSContent){
switch ($CMSContent->field){
case 'text':
return $CMSContent->text;
break;
case 'full_text':
return $CMSContent->full_text;
break;
case 'integer':
return $CMSContent->integer;
break;
case 'decimal':
return $CMSContent->decimal;
break;
}
}
return false;
}
}