fixed comments send bugs

master
A1Gard 1 week ago
parent 9dd5008ee2
commit e82372d5c7

@ -92,7 +92,8 @@ class ClientController extends Controller
__('Video clips') => clipsUrl(),
$clip->title => null,
];
return view('client.default-list', compact('area', 'clip', 'title', 'subtitle', 'breadcrumb'));
$model = $clip;
return view('client.default-list', compact('area', 'clip', 'title', 'subtitle', 'breadcrumb','model'));
}
public function gallery($slug)
@ -175,7 +176,8 @@ class ClientController extends Controller
__('Attachments') => attachmentsUrl(),
$attachment->title => null,
];
return view('client.default-list', compact('area', 'attachment', 'title', 'subtitle', 'breadcrumb'));
$model = $attachment;
return view('client.default-list', compact('area', 'attachment', 'title', 'subtitle', 'breadcrumb','model'));
}
public function tag($slug)
@ -221,7 +223,9 @@ class ClientController extends Controller
}
}
if ($request->input('parent_id') != '') {
$comment->parent_id = $request->input('parent_id', null);
}
$comment->body = $request->input('message');
$comment->commentable_type = $request->input('commentable_type');
$comment->commentable_id = $request->input('commentable_id');

@ -12,7 +12,7 @@
@endforeach
@endif
@foreach(getParts($area) as $part)
@php($p = $part->getBladeWithData())
@php($p = $part->getBladeWithData($model??null))
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(findArea($area)->use_default)

@ -12,7 +12,7 @@
@endforeach
@endif
@foreach(getParts($area) as $part)
@php($p = $part->getBladeWithData())
@php($p = $part->getBladeWithData($gallery))
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(findArea($area)->use_default)

@ -11,7 +11,7 @@
@endforeach
@endif
@foreach(getParts($area,$post) as $part)
@php($p = $part->getBladeWithData())
@php($p = $part->getBladeWithData($post))
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(findArea($area,$post)->use_default)

@ -12,7 +12,7 @@
@endforeach
@endif
@foreach(getParts($area,$product) as $part)
@php($p = $part->getBladeWithData())
@php($p = $part->getBladeWithData($product))
@include($p['blade'],['data' => $p['data']])
@endforeach
@if(findArea($area,$product)->use_default)

Loading…
Cancel
Save