Hotfix create ticket
This commit is contained in:
parent
da27907625
commit
9bc9f8007a
2 changed files with 5 additions and 4 deletions
|
|
@ -190,13 +190,14 @@ class TicketController extends Controller
|
|||
$ticket->file2 = ToolboxHelper::storeImage($ticket->getTable(), $fileTicket2);
|
||||
}
|
||||
|
||||
if ($request->labels) {
|
||||
$ticket->labels()->sync($request->labels);
|
||||
}
|
||||
$ticket->user()->associate(auth()->user());
|
||||
$ticket->site()->associate($site);
|
||||
$ticket->saveOrFail();
|
||||
|
||||
if ($request->labels) {
|
||||
$ticket->labels()->sync($request->labels);
|
||||
}
|
||||
|
||||
$user->subscriptions()->toggle($ticket->id);
|
||||
|
||||
if (config('mail.MAIL_ADMIN')) {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ $userPr = Auth::user()->sites ?? collect([]);
|
|||
@php
|
||||
$dataVue = [
|
||||
'name' => 'labels',
|
||||
'value' => old('labels', optional($ticket ?? null)->labels),
|
||||
'value' => optional($ticket ?? null)->labels,
|
||||
'labels' => \App\Models\Label::all()
|
||||
];
|
||||
@endphp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue