major
parent
cdd8da9fdb
commit
4d275414d0
|
|
@ -54,8 +54,8 @@ class PublicationForms extends FormsService {
|
|||
|
||||
|
||||
public function store(array $data): ?JsonResponse {
|
||||
if (!empty($data['attach']['page_slug'])) {
|
||||
$page = Page::query()->where(['slug' => $data['attach']['page_slug']])->first();
|
||||
if (!empty($data['attach']['page_id'])) {
|
||||
$page = Page::byUuid($data['attach']['page_id'])->first();
|
||||
$data['page_id'] = $page->id;
|
||||
}
|
||||
$data['user_id'] = Auth::user()->id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue