Files
freeu-project/app/Models/MarketplaceSellerForm.php
2024-06-04 12:41:20 +05:30

39 lines
1.6 KiB
PHP

<?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'];
// protected $table = 'marketplace_seller_forms';
public function users(){
return $this->belongsTo(User::class,'users_id');
}
public function aif(){
// 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);
// return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id');
}
public function fre(){
// 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);
// $data = $this->hasMany(MarketplaceFractionalRealEstateSeller::class,'seller_forms_id')->where('status','Approved');
// dd($data);
}
public function op(){
return $this->hasMany(MarketplaceOtherProductsSeller::class,'seller_forms_id')->where('listing_status', '!=','Hide');
}
}