Fewo/ PDFs / Mails v3
This commit is contained in:
parent
7abfe3f700
commit
e537e47a82
44 changed files with 2112 additions and 527 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue