Files
freeu-project/app/Models/MarketplaceSellerForm.php

39 lines
1.6 KiB
PHP
Raw Normal View History

2024-03-28 14:52:40 +05:30
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class MarketplaceSellerForm extends Model
{
use HasFactory;
protected $fillable = ['users_id','name','city','country','postal_code','contact_number','email','declaration'];
2024-05-16 16:59:33 +05:30
// protected $table = 'marketplace_seller_forms';
2024-03-28 14:52:40 +05:30
public function users(){
2024-05-30 19:06:30 +05:30
return $this->belongsTo(User::class,'users_id');
2024-03-28 14:52:40 +05:30
}
public function aif(){
2024-05-02 15:22:44 +05:30
// return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id')->where('listing_status', '!=','Hide')->where('status','Approved');
// return
return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id')->where('status','Approved')->where('no_of_units_you_wish_to_sell','!=',0);
// dd($data);
2024-04-26 18:40:07 +05:30
// return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id');
2024-03-28 14:52:40 +05:30
}
public function fre(){
2024-05-02 15:22:44 +05:30
// return $this->hasMany(MarketplaceFractionalRealEstateSeller::class,'seller_forms_id')->where('listing_status', '!=','Hide')->where('status','Approved');
return $this->hasMany(MarketplaceFractionalRealEstateSeller::class,'seller_forms_id')->where('status','Approved')->where('current_market_value_of_the_property','!=',0);
2024-05-10 11:52:09 +05:30
// $data = $this->hasMany(MarketplaceFractionalRealEstateSeller::class,'seller_forms_id')->where('status','Approved');
// dd($data);
2024-03-28 14:52:40 +05:30
}
public function op(){
return $this->hasMany(MarketplaceOtherProductsSeller::class,'seller_forms_id')->where('listing_status', '!=','Hide');
}
2024-05-30 19:06:30 +05:30
}