FIX: fix saving published_from and published_to fields

This commit is contained in:
Michal Kváček
2016-10-12 17:15:58 +02:00
parent 4a95a9692d
commit 9b6ae9f9f8
2 changed files with 5 additions and 2 deletions
@@ -130,8 +130,8 @@ class CreateNewContent extends Controller
$page->language = LaravelLocalization::getCurrentLocale();
$page->title = $request->title;
$page->url = Str::slug($request->url);
$page->published_from = $request->publishedFrom;
$page->published_to = $request->publishedTo;
$page->published_from = empty($request->publishedFrom) ? null : $request->publishedFrom;
$page->published_to = empty($request->publishedTo) ? null : $request->publishedTo;
$page->meta_keywords = $request->metaKeywords;
$page->meta_description = $request->metaDescription;
$page->content = $request->pageContent;