PaymentLinks.php 503 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class PaymentLinks extends Model
  5. {
  6. //
  7. public function outlets(){
  8. return $this->belongsTo('\App\Models\Outlets','outlet_id','id');
  9. }
  10. public function restuarents(){
  11. return $this->belongsTo('\App\Models\Restaurants','resto_id','id');
  12. }
  13. public function payments(){
  14. return $this->hasMany('\App\Models\PaymentLinkPayments','payment_link_code','unique_id')->where('status','paid');
  15. }
  16. }