Guest User

Untitled

a guest
Apr 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. $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)
  2. union all
  3. (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)");
  4.  
  5. dd($guarantee_tickets->user->name);
  6.  
  7. public function user()
  8. {
  9. return $this->hasOne(User::class, 'id', 'user_id');
  10. }
Add Comment
Please, Sign In to add comment