Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public function getSecurityDepositEntryAttribute() {
  2. return Rent::where('property_id', $this->property_id)->where('lease_request_id', $this->id)->where('type', 'security_deposit_migration')->orderBy('created_at', 'asc')->first();
  3. }
  4.  
  5. LeaseRequest::whereHas('security_deposit_entry', function($query) {
  6. $query->whereColumnNotIn('status', ['refund_in_process', 'refunded']);
  7. })->get();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement