check if user has account
This commit is contained in:
parent
2016834ec3
commit
3d22434acc
|
|
@ -119,7 +119,9 @@ public function postTicket(TicketRequest $request)
|
|||
$ticket = new Ticket($request->only('content', 'title','category_id'));
|
||||
$client = $request->user();
|
||||
$ticket['client_id'] = $client->id;
|
||||
$ticket['account_id'] = $client->account_id;
|
||||
if($client->account_id){
|
||||
$ticket['account_id'] = $client->account_id;
|
||||
}
|
||||
$status = Status::where('name', 'Open')->firstOrFail();
|
||||
$ticket['status_id'] = $status->id;
|
||||
$ticket['last_sender'] = 'client';
|
||||
|
|
|
|||
Loading…
Reference in New Issue