FIX: fix published_from and published_to fields
This commit is contained in:
@@ -12,14 +12,14 @@ class CreateNewContentRequest extends Request
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'titlePhoto' => 'image',
|
||||
'title' => 'required',
|
||||
'url' => 'required|unique:contents,url',
|
||||
'status' => 'required|in:draft,protected,public',
|
||||
'title_photo' => 'exists:files,id',
|
||||
'parentPage' => 'exists:contents,id',
|
||||
'published_from' => 'date',
|
||||
'published_to' => 'date',
|
||||
'titlePhoto' => 'image',
|
||||
'title' => 'required',
|
||||
'url' => 'required|unique:contents,url',
|
||||
'status' => 'required|in:draft,protected,public',
|
||||
'title_photo' => 'exists:files,id',
|
||||
'parentPage' => 'exists:contents,id',
|
||||
'publishedFrom' => 'date',
|
||||
'publishedTo' => 'date',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ class EditContentRequest extends Request
|
||||
$statuses = implode(',', $statuses);
|
||||
|
||||
return [
|
||||
'title' => 'required',
|
||||
'url' => 'required|unique:contents,url,' . $this->id,
|
||||
'published_from' => 'date',
|
||||
'published_to' => 'date',
|
||||
'title_photo' => 'exists:files,id',
|
||||
'status' => 'required|in:' . $statuses,
|
||||
'parentPage' => 'exists:contents,id'
|
||||
'title' => 'required',
|
||||
'url' => 'required|unique:contents,url,' . $this->id,
|
||||
'publishedFrom' => 'date',
|
||||
'publishedTo' => 'date',
|
||||
'title_photo' => 'exists:files,id',
|
||||
'status' => 'required|in:' . $statuses,
|
||||
'parentPage' => 'exists:contents,id'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@lang('admin/contents.field_published_from')
|
||||
</label>
|
||||
|
||||
<input type="datetime" class="form-control" name="published_from" value="{{old('published_from', $page->published_from)}}"
|
||||
<input type="datetime" class="form-control" name="publishedFrom" value="{{old('published_from', $page->published_from)}}"
|
||||
placeholder="@lang('admin/contents.field_published_from')" />
|
||||
|
||||
@include('admin.snippets.hasError', ['field' => 'published_from'])
|
||||
@@ -15,7 +15,7 @@
|
||||
@lang('admin/contents.field_published_to')
|
||||
</label>
|
||||
|
||||
<input type="datetime" class="form-control" name="published_to" value="{{old('published_to', $page->published_to)}}"
|
||||
<input type="datetime" class="form-control" name="publishedTo" value="{{old('published_to', $page->published_to)}}"
|
||||
placeholder="@lang('admin/contents.field_published_to')" />
|
||||
@include('admin.snippets.hasError', ['field' => 'published_to'])
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user