Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $guarantee_tickets = DB::select("(select ga.id, '' as unique_product_id, ga.user_id, ga.submit_time, '' as title, ga.description, '' as tracking_code, '' as closed, '' as close_date, ga.isAdminNote from guarantee_tickets_answers ga where guarantee_tickets_id = $request->id order by ga.id desc)
- union all
- (select gt.id, gt.unique_product_id, gt.user_id, gt.submit_time, gt.title, gt.description, gt.tracking_code, gt.closed, gt.close_date, '' from guarantee_tickets gt where id = $request->id)");
- dd($guarantee_tickets->user->name);
- public function user()
- {
- return $this->hasOne(User::class, 'id', 'user_id');
- }
Add Comment
Please, Sign In to add comment