2024-03-28 14:52:40 +05:30
< ? php
use App\Models\User ;
use App\Models\Chat ;
use App\Models\Company ;
use App\Models\Content ;
use App\Models\Product ;
use App\Models\Category ;
use App\Models\Admin\Blog ;
use App\Models\Admin\Testimonial ;
use App\Models\MonthlyUpdateMaster ;
use App\Models\MarketplaceBuyerForm ;
use App\Models\MarketplaceSellerForm ;
use App\Models\ProductTrailCommission ;
use App\Models\MonthlyUpdatePeerToPeerLending ;
use App\Models\MarketplaceOtherProductsSeller ;
use App\Models\MonthlyUpdateFractionalRealEstate ;
use App\Models\MonthlyUpdateIndianFinancialAssets ;
use App\Models\MonthlyUpdateAlternativeInvestmentFund ;
use App\Models\MarketplaceFractionalRealEstateSeller ;
use App\Models\MarketplaceAlternativeInvestmentFundSeller ;
2024-04-09 17:56:07 +05:30
use App\Models\Iam_App_Resources ;
2024-03-28 14:52:40 +05:30
// validation error message
if ( ! function_exists ( 'validationErrorMessage' )) {
function validationErrorMessage ( $validator )
{
if ( $validator -> fails ()) {
$errors = $validator -> errors ();
$messages = '' ;
foreach ( $errors -> all () as $message ) {
$messages .= $message . '</br>' ;
}
return $messages ;
}
}
}
2024-04-25 10:51:46 +05:30
function getUnreadMessage ()
{
2024-06-07 16:19:29 +05:30
return Chat :: where ([ 'user_id' => auth () -> guard ( 'users' ) -> user () -> id , 'is_read' => false ]) -> count ();
2024-04-25 10:51:46 +05:30
}
2024-06-07 16:35:40 +05:30
function dNone ( $value = null )
{
if ( $value )
{
return '' ;
}
return 'd-none' ;
}
2024-05-15 14:39:18 +05:30
function getConvertedDate ( $date )
{
2024-06-07 16:19:29 +05:30
if ( strlen ( $date ) == 8 ) {
$dateArray = str_split ( $date , 4 );
$newDate = str_split ( $dateArray [ 0 ], 2 );
return ( string ) $newDate [ 0 ] . '-' . ( string ) $newDate [ 1 ] . '-' . ( string ) $dateArray [ 1 ];
2024-05-15 14:39:18 +05:30
}
return null ;
}
2024-03-28 14:52:40 +05:30
function imagePath ( $path = null )
{
2024-04-24 15:20:53 +05:30
$finalPath = " https://staging.jerichoalternatives.in/ " ;
2024-04-04 19:13:00 +05:30
if ( env ( 'APP_ENV' ) == 'production' ) {
2024-03-28 14:52:40 +05:30
$finalPath = " https://jerichoalternatives.in/ " ;
}
2024-04-04 19:13:00 +05:30
if ( env ( 'APP_ENV' ) == 'staging' ) {
2024-03-28 14:52:40 +05:30
$finalPath = " https://staging.jerichoalternatives.in/ " ;
}
2024-04-04 19:13:00 +05:30
if ( env ( 'APP_ENV' ) == 'local' ) {
2024-05-21 19:26:27 +05:30
$finalPath = " http://localhost/my-freeu/ " ;
2024-03-29 12:30:45 +05:30
}
2024-04-04 19:13:00 +05:30
return $finalPath . $path ;
2024-03-28 14:52:40 +05:30
}
2024-04-25 14:48:59 +05:30
function getUserActivateStatus ()
{
2024-05-16 16:59:33 +05:30
// return auth()->guard("users")->user()->id;
// return MarketplaceSellerForm::where("users_id",auth()->guard("users")->user()->id)->where("status",true)->exists();
2024-06-07 16:19:29 +05:30
if ( auth () -> guard ( " users " ) -> user () && auth () -> guard ( " users " ) -> user () -> id ) {
$userActive = User :: where ([ " id " => auth () -> guard ( " users " ) -> user () -> id , " status " => true ]) -> exists ();
if ( $userActive ) {
if ( $userActive && MarketplaceSellerForm :: where ([ " users_id " => auth () -> guard ( " users " ) -> user () -> id , " status " => false ]) -> exists ()) {
return MarketplaceSellerForm :: where ([ " users_id " => auth () -> guard ( " users " ) -> user () -> id , " status " => true ]) -> exists ();
2024-05-16 16:59:33 +05:30
}
return true ;
}
return false ;
// if(User::where(["id"=>auth()->guard("users")->user()->id,"status"=>false])->exists())
// {
// return User::where(["id"=>auth()->guard("users")->user()->id,"status"=>true])->exists();
// }
// if(MarketplaceSellerForm::where(["users_id "=>auth()->guard("users")->user()->id,"status"=>true])->exists())
// {
// return MarketplaceSellerForm::where(["users_id "=>auth()->guard("users")->user()->id,"status"=>true])->exists();
// }
// OLD
// $checkUserActivate = User::where(["id"=>auth()->guard("users")->user()->id,"status"=>true])->exists();
// $firstConditon = false;
// if($checkUserActivate)
// {
// $firstConditon = $checkUserActivate;
// // return $checkUserActivate;
// }
// $checkSellerProfile = MarketplaceSellerForm::where(["users_id"=>auth()->guard("users")->user()->id,"status"=>true])->exists();
// if($firstConditon == true && $checkSellerProfile )
// {
// return $checkSellerProfile || $firstConditon ? true : false;
// }
// return false;
2024-06-07 16:19:29 +05:30
} else {
2024-04-25 16:14:04 +05:30
return false ;
}
2024-04-25 14:48:59 +05:30
// return auth()->guard("users")->user()->id;
}
2024-05-16 16:59:33 +05:30
function getMarketplaceSellerProfileStatus ()
{
2024-06-07 16:19:29 +05:30
if ( auth () -> guard ( " users " ) -> user () && auth () -> guard ( " users " ) -> user () -> id ) {
if ( MarketplaceSellerForm :: where ( " users_id " , auth () -> guard ( " users " ) -> user () -> id ) -> exists ()) {
return MarketplaceSellerForm :: where ([ " users_id " => auth () -> guard ( " users " ) -> user () -> id , " status " => true ]) -> exists ();
2024-05-16 16:59:33 +05:30
}
return false ;
2024-06-07 16:19:29 +05:30
} else {
2024-05-16 16:59:33 +05:30
return false ;
}
}
2024-03-28 14:52:40 +05:30
function routeForHandpickedInvestment ( $categoryId )
{
// return $categoryId;
// $routes = [
// // Category::HighYieldFinanceId => 'high-yield-finance.product',
// Category::FractionalRealEstateId => 'fractional-real-estate.product',
// // Category::PeerToPeerLendingId => 'peer-to-peer-lending.product',
// Category::VentureDebtId => 'venture-debts.product',
// Category::IndianResidentialRealEstateID => 'ire.product',
// Category::IndianCommercialRealEstateID => 'ire.product',
// Category::IndianIndustrialRealEstateID => 'ire.product',
// Category::GlobalResidentialRealEstateID => 'gre.product',
// Category::GlobalCommercialRealEstateID => 'gre.product',
// Category::GlobalIndustrialRealEstateID => 'gre.product',
// // Category::LeaseBasedFinancingId => 'lease-based-financing.product',
// // Category::SecuritizedDebtInstrumentId => 'securitized-debt-instrument.product',
// // Category::CleanAndGreenAssetsId => 'clean-and-green-assets.product',
// // Category::InvoiceDiscountingId => 'invoice-discounting.product',
// Category::VentureCapitalFundId => 'alternative-investment-fund.venture-capital-fund-product',
// Category::InfrastructureFundId => 'alternative-investment-fund.venture-capital-fund-product',
// Category::AngelFundId => 'alternative-investment-fund.angel-fund-product',
// Category::PrivateEquityFundId => 'alternative-investment-fund.private-equity-fund-product',
// Category::DebtFundId => 'alternative-investment-fund.debt-fund-product',
// Category::PrivateRealEstateFundId => 'alternative-investment-fund.private-real-estate-fund-product',
// Category::HedgeFundId => 'alternative-investment-fund.hedge-fund-product',
// Category::PrivateInvestmentInPublicEquityFundId => 'alternative-investment-fund.private-investment-public-equity-product',
// Category::SovereignGovernmentBondId => 'bonds.product',
// Category::GlobalMutualFundId => 'mutual-funds.product',
// Category::EquitiesId => 'equities.product',
// Category::GlobalHedgeFundId => 'hedge-funds.product',
// // Category::InfrastructureFundId => 'alternative-investment-fund.',
// //Change below code later
// //
// ];
$routes = [
Category :: HighYieldFinanceId => 'high-yield-finance.product' ,
Category :: FractionalRealEstateId => 'fractional-real-estate.product' ,
Category :: PeerToPeerLendingId => 'peer-to-peer-lending.product' ,
Category :: VentureDebtId => 'venture-debts.product' ,
Category :: IndianResidentialRealEstateID => 'ire.product' ,
Category :: IndianCommercialRealEstateID => 'ire.product' ,
Category :: IndianIndustrialRealEstateID => 'ire.product' ,
Category :: GlobalResidentialRealEstateID => 'gre.product' ,
Category :: GlobalCommercialRealEstateID => 'gre.product' ,
Category :: GlobalIndustrialRealEstateID => 'gre.product' ,
Category :: LeaseBasedFinancingId => 'lease-based-financing.product' ,
Category :: SecuritizedDebtInstrumentId => 'securitized-debt-instrument.product' ,
Category :: CleanAndGreenAssetsId => 'clean-and-green-assets.product' ,
Category :: InvoiceDiscountingId => 'invoice-discounting.product' ,
Category :: VentureCapitalFundId => 'alternative-investment-fund.venture-capital-fund-product' ,
2024-05-03 15:38:50 +05:30
Category :: GlobalVentureCapitalFundId => 'venture-capital-funds.product' ,
2024-03-28 14:52:40 +05:30
Category :: InfrastructureFundId => 'alternative-investment-fund.infrastructure-fund-product' ,
Category :: FundForDistressedAssetId => 'alternative-investment-fund.fund-for-distressed-asset-product' ,
Category :: AngelFundId => 'alternative-investment-fund.angel-fund-product' ,
Category :: PrivateEquityFundId => 'alternative-investment-fund.private-equity-fund-product' ,
2024-05-09 13:02:24 +05:30
Category :: GlobalPrivateEquityFundId => 'private-equity-funds.product' ,
2024-04-04 19:13:00 +05:30
Category :: PrivateCreditFundId => 'alternative-investment-fund.private-credit-fund-product' ,
2024-04-11 16:35:06 +05:30
Category :: GlobalPrivateCreditFundId => 'global-private-credit-fund-product' ,
2024-03-28 14:52:40 +05:30
Category :: PrivateRealEstateFundId => 'alternative-investment-fund.private-real-estate-fund-product' ,
Category :: HedgeFundId => 'alternative-investment-fund.hedge-fund-product' ,
2024-04-05 19:52:30 +05:30
// Category::LongOnlyFundId => 'alternative-investment-fund.hedge-fund-product',
2024-04-05 17:39:33 +05:30
Category :: LongOnlyFundId => 'alternative-investment-fund.long-only-equity-fund-product' ,
2024-03-28 14:52:40 +05:30
Category :: PrivateInvestmentInPublicEquityFundId => 'alternative-investment-fund.private-investment-public-equity-product' ,
Category :: SovereignGovernmentBondId => 'bonds.product' ,
Category :: GlobalMutualFundId => 'mutual-funds.product' ,
Category :: EquitiesId => 'equities.product' ,
Category :: GlobalHedgeFundId => 'hedge-funds.product' ,
];
return $routes [ $categoryId ];
// $condition = array_search($categoryId, $routes);
// return $condition == true ? $condition : 'venture-debts.product';
}
2024-04-18 12:24:11 +05:30
function IND_money_format ( $number )
2024-06-07 16:19:29 +05:30
{
$decimal = ( string )( $number - floor ( $number ));
$money = floor ( $number );
$length = strlen ( $money );
$delimiter = '' ;
$money = strrev ( $money );
for ( $i = 0 ; $i < $length ; $i ++ ) {
if (( $i == 3 || ( $i > 3 && ( $i - 1 ) % 2 == 0 )) && $i != $length ) {
$delimiter .= ',' ;
2024-04-18 12:24:11 +05:30
}
2024-06-07 16:19:29 +05:30
$delimiter .= $money [ $i ];
}
2024-04-18 12:24:11 +05:30
2024-06-07 16:19:29 +05:30
$result = strrev ( $delimiter );
$decimal = preg_replace ( " /0 \ ./i " , " . " , $decimal );
$decimal = substr ( $decimal , 0 , 3 );
2024-04-18 12:24:11 +05:30
2024-06-07 16:19:29 +05:30
if ( $decimal != '0' ) {
$result = $result . $decimal ;
2024-04-18 12:24:11 +05:30
}
2024-06-07 16:19:29 +05:30
return '₹ ' . $result ;
}
2024-03-28 14:52:40 +05:30
function testimonial ()
{
return Testimonial :: where ( 'is_active' , true ) -> get ();
}
function latestBlog ()
{
return Blog :: where ( 'is_active' , true ) -> take ( 3 ) -> get ();
}
function privacyPolicy ()
{
return Content :: where ( 'type' , 'privacy-policy' ) -> value ( 'content' );
}
function termsConditions ()
{
return Content :: where ( 'type' , 'terms-and-condition' ) -> value ( 'content' );
}
function getAllNotifications ()
{
$user = User :: find ( auth () -> guard ( 'users' ) -> user () -> id );
2024-06-05 14:59:33 +05:30
// dd($user->unreadNotifications);
return $user -> notifications ;
2024-03-28 14:52:40 +05:30
}
function getAllAdminNotifications ()
{
// $arr = [];
// return $arr;
$user = User :: find ( auth () -> user () -> id );
2024-05-29 16:29:37 +05:30
// return $user->unreadNotifications;
return $user -> notifications ;
2024-03-28 14:52:40 +05:30
}
function getUserProfile ()
{
if ( ! auth () -> guard ( 'users' ) -> user ()) {
return [
'name' => false ,
'profile-image' => false
];
}
$user = User :: find ( auth () -> guard ( 'users' ) -> user () -> id );
if ( $user ) {
return [
'name' => $user -> name ,
'profile-image' => $user -> profile_image
];
}
}
function getAdminProfile ()
{
$user = User :: find ( auth () -> user () -> id );
return [
'name' => $user -> name ,
'email' => $user -> email ,
'profile-image' => $user -> profile_image
];
}
function getAllProductNames ( $categoriesId = '' )
{
return Product :: leftJoin ( 'securitized_debt_instruments as sdi' , 'products.id' , 'sdi.products_id' )
-> leftJoin ( 'fractional_real_estates as fre' , 'products.id' , 'fre.products_id' )
-> leftJoin ( 'peer_to_peer_lendings as p2p' , 'products.id' , 'p2p.products_id' )
-> leftJoin ( 'invoice_discountings as id' , 'products.id' , 'id.products_id' )
-> leftJoin ( 'alternative_investment_funds as aif' , 'products.id' , 'aif.products_id' )
-> leftJoin ( 'clean_and_green_assets as caga' , 'products.id' , 'caga.products_id' )
-> leftJoin ( 'high_yield_finances as hyf' , 'products.id' , 'hyf.products_id' )
-> leftJoin ( 'lease_based_financings as lbf' , 'products.id' , 'lbf.products_id' )
-> leftJoin ( 'venture_debts as vd' , 'products.id' , 'vd.products_id' )
-> leftJoin ( 'bonds as bd' , 'products.id' , 'bd.products_id' )
-> leftJoin ( 'funds as fd' , 'products.id' , 'fd.products_id' )
-> leftJoin ( 'stock_funds_real_estate_exchanges as exchange' , 'products.id' , 'exchange.products_id' )
-> leftJoin ( 'real_estates as re' , 'products.id' , 're.products_id' )
-> where ( 'status' , true )
-> when ( $categoriesId !== '' , function ( $query ) use ( $categoriesId ) {
$query -> whereIn ( 'categories_id' , [ $categoriesId ]);
})
-> select ( \DB :: raw ( 'products.id,coalesce(sdi.product_name, p2p.scheme, fre.property_name_and_location,id.company_name,aif.fund_name,caga.project_name,hyf.security_name,lbf.company,sdi.product_name,vd.company_name,bd.issuer,fd.fund_name,exchange.name,re.property_name) as product_name' )) -> get ();
}
function getAllSoldProducts ( $sellerFormId )
{
$productsSold = 0 ;
$marketplaceAIFPRoducts = MarketplaceAlternativeInvestmentFundSeller :: where ( 'seller_forms_id' , $sellerFormId ) -> get ();
foreach ( $marketplaceAIFPRoducts as $data ) {
2024-06-07 16:19:29 +05:30
if ( $data -> no_of_units_you_wish_to_sell == 0 ) {
2024-06-04 12:41:20 +05:30
if ( MarketplaceBuyerForm :: where ([ 'table' => 'marketplace_aif_sellers' , 'status' => 'Sold' , 'associated_id' => $data -> id ]) -> exists ()) {
$productsSold ++ ;
}
2024-03-28 14:52:40 +05:30
}
}
$marketplaceFREPRoducts = MarketplaceFractionalRealEstateSeller :: where ( 'seller_forms_id' , $sellerFormId ) -> get ();
foreach ( $marketplaceFREPRoducts as $data ) {
2024-06-07 16:19:29 +05:30
if ( $data -> current_market_value_of_the_property == 0 ) {
2024-06-04 12:41:20 +05:30
if ( MarketplaceBuyerForm :: where ([ 'table' => 'marketplace_fre_sellers' , 'status' => 'Sold' , 'associated_id' => $data -> id ]) -> exists ()) {
$productsSold ++ ;
}
2024-03-28 14:52:40 +05:30
}
}
2024-06-04 12:41:20 +05:30
// $marketplaceOPPRoducts = MarketplaceOtherProductsSeller::where('seller_forms_id', $sellerFormId)->get();
// foreach ($marketplaceOPPRoducts as $data) {
// if (MarketplaceBuyerForm::where(['table' => 'marketplace_op_sellers', 'status' => 'Sold', 'associated_id' => $data->id])->exists()) {
// $productsSold++;
// }
// }
2024-03-28 14:52:40 +05:30
return $productsSold ;
}
function totalInvestmentCount ( $id )
{
return MonthlyUpdateMaster :: where ([ 'users_id' => $id , 'holding_status' => 'Holding' ]) -> count ();
}
function totalInvestment ( $id , $type = null )
{
// $user = MonthlyUpdateMaster::where('users_id', $id)->where('holding_status',$type)->get();
$user = MonthlyUpdateMaster :: where ( 'users_id' , $id ) -> when ( $type !== null , function ( $query ) use ( $type ) {
return $query -> where ( 'holding_status' , $type );
}) -> get ();
$productDetails = [];
foreach ( $user as $singleMUM ) {
$dataArr = [
'categories' => $singleMUM -> categories ,
'product_category' => $singleMUM -> product_category ,
'product_name' => $singleMUM -> product_name ,
];
if ( MonthlyUpdateAlternativeInvestmentFund :: where ( 'custom_id' , $singleMUM -> custom_id ) -> exists ()) {
$data = MonthlyUpdateAlternativeInvestmentFund :: where ( 'custom_id' , $singleMUM -> custom_id ) -> latest () -> first ();
$dataArr [ 'total_investment_amount' ] = $data -> getRawOriginal ( 'commitment_amount' );
array_push ( $productDetails , $dataArr );
} elseif ( MonthlyUpdateFractionalRealEstate :: where ( 'custom_id' , $singleMUM -> custom_id ) -> first ()) {
$data = MonthlyUpdateFractionalRealEstate :: where ( 'custom_id' , $singleMUM -> custom_id ) -> latest () -> first ();
$dataArr [ 'total_investment_amount' ] = $data -> getRawOriginal ( 'absolute_return_till_date' );
array_push ( $productDetails , $dataArr );
} elseif ( MonthlyUpdatePeerToPeerLending :: where ( 'custom_id' , $singleMUM -> custom_id ) -> first ()) {
$data = MonthlyUpdatePeerToPeerLending :: where ( 'custom_id' , $singleMUM -> custom_id ) -> latest () -> first ();
if ( $singleMUM -> categories == 'Liquiloans' ) {
$dataArr [ 'total_investment_amount' ] = $data -> getRawOriginal ( 'total_investment' );
} elseif ( $singleMUM -> categories == 'Faircent' ) {
$dataArr [ 'total_investment_amount' ] = $data -> getRawOriginal ( 'all_time_amount_invested' );
} elseif ( $singleMUM -> categories == 'Finance Peer' ) {
$dataArr [ 'total_investment_amount' ] = $data -> getRawOriginal ( 'all_time_investment_added' );
}
array_push ( $productDetails , $dataArr );
} elseif ( MonthlyUpdateIndianFinancialAssets :: where ( 'custom_id' , $singleMUM -> custom_id ) -> first ()) {
$data = MonthlyUpdateIndianFinancialAssets :: where ( 'custom_id' , $singleMUM -> custom_id ) -> latest () -> first ();
$dataArr [ 'total_investment_amount' ] = $data -> amount_invested ;
array_push ( $productDetails , $dataArr );
}
}
$totalInvestment = array_sum ( array_column ( $productDetails , 'total_investment_amount' ));
$totalInvestment = IND_money_format ( $totalInvestment );
return $totalInvestment ;
}
function generateCommissionCount ()
{
return ProductTrailCommission :: whereDate ( 'commission_date' , '<=' , now ()) -> where ( 'commission_earned' , 'No' ) -> count ();
}
2024-04-08 11:45:02 +05:30
function riskDisclosureData ()
{
2024-04-09 17:56:07 +05:30
return Content :: where ( 'type' , 'terms-and-condition' ) -> value ( 'content' );
}
function checkSidebarAccess ( $resource )
{
$user = User :: with ( 'getAppResourcesActionLink' ) -> where ( 'id' , \Auth :: user () -> id ) -> first ();
$sidebarSlugs = array ();
foreach ( $user -> getAppResourcesActionLink as $userResource ) {
$resourceSlug = Iam_App_Resources :: find ( $userResource -> app_resource_xid );
array_push ( $sidebarSlugs , $resourceSlug -> slug );
}
if ( in_array ( $resource , $sidebarSlugs ) || $user -> role == 1 ) {
return true ;
} else {
return false ;
}
2024-04-08 11:45:02 +05:30
}
2024-03-28 14:52:40 +05:30
function unreadChats ()
{
$unreadChats = Chat :: groupBy ( 'user_id' ) -> where ( 'read_at' , null ) -> get ();
return count ( $unreadChats );
}
function companyName ( $id )
{
return Company :: where ( 'id' , $id ) -> value ( 'company_name' );
}
function getCategoryIcons ( $categoryId )
{
$category_icons = [
" public/assets/media/FrontendImages/fract-state.svg " => Category :: FractionalRealEstateId ,
2024-04-04 19:13:00 +05:30
" public/assets/media/FrontendImages/capital-funds.svg " => Category :: VentureCapitalFundId , // aif product icons start from here
2024-03-28 14:52:40 +05:30
" public/assets/media/FrontendImages/comm-real-state.svg " => Category :: IndianCommercialRealEstateID ,
" public/assets/media/FrontendImages/stra-fund.svg " => Category :: HedgeFundId ,
2024-04-04 19:13:00 +05:30
" public/assets/media/FrontendImages/assets-funds.svg " => Category :: FundForDistressedAssetId , // new category start from here
" public/assets/media/FrontendImages/private.svg " => Category :: PrivateRealEstateFundId ,
" public/assets/media/FrontendImages/bay-arrow.svg " => Category :: LongOnlyFundId ,
" public/assets/media/FrontendImages/Infr-funds.svg " => Category :: InfrastructureFundId ,
2024-04-05 19:30:15 +05:30
" public/assets/media/FrontendImages/cradit-funds.svg " => Category :: PrivateCreditFundId ,
// "public/assets/media/FrontendImages/cradit-funds.svg" => 40,
2024-04-04 19:13:00 +05:30
" public/assets/media/FrontendImages/equity-funds.svg " => Category :: PrivateEquityFundId ,
" public/assets/media/FrontendImages/angel-funds.svg " => Category :: AngelFundId ,
" public/assets/media/FrontendImages/stra-fund.svg " => Category :: HedgeFundId ,
" public/assets/media/FrontendImages/pipe-funds.svg " => Category :: PrivateInvestmentInPublicEquityFundId ,
" public/assets/media/FrontendImages/stra-fund.svg " => Category :: GlobalHedgeFundId , //global product icons start from here
2024-04-05 19:30:15 +05:30
" public/assets/media/FrontendImages/cradit-funds.svg " => Category :: GlobalPrivateCreditFundId ,
2024-04-04 19:13:00 +05:30
" public/assets/media/FrontendImages/equity-funds.svg " => Category :: GlobalPrivateEquityFundId ,
" public/assets/media/FrontendImages/capital-funds.svg " => Category :: GlobalVentureCapitalFundId ,
" public/assets/media/FrontendImages/login-img/alternative.svg " => Category :: IndianIndustrialRealEstateID , // indain real estate start from here
" public/assets/media/FrontendImages/resi-real-state.svg " => Category :: IndianResidentialRealEstateID ,
" public/assets/media/FrontendImages/comm-real-state.svg " => Category :: IndianCommercialRealEstateID ,
" public/assets/media/FrontendImages/login-img/alternative.svg " => Category :: GlobalIndustrialRealEstateID , // global real estate start from here
" public/assets/media/FrontendImages/resi-real-state.svg " => Category :: GlobalResidentialRealEstateID ,
" public/assets/media/FrontendImages/comm-real-state.svg " => Category :: GlobalCommercialRealEstateID ,
2024-03-28 14:52:40 +05:30
];
2024-05-09 15:42:22 +05:30
// return $categoryId;
// if ($categoryId === Category::PrivateEquityFundId) {
// return "public/assets/media/FrontendImages/equity-funds.svg";
// }
// if ($categoryId === Category::VentureCapitalFundId) {
// return "public/assets/media/FrontendImages/capital-funds.svg";
// }
// $condition = array_search($categoryId, $category_icons);
2024-05-06 15:29:06 +05:30
// return $condition;
2024-05-09 15:42:22 +05:30
// return $condition == true ? $condition : 'public/assets/media/FrontendImages/bay-arrow.svg';
2024-06-07 16:19:29 +05:30
switch ( $categoryId ) {
2024-05-09 15:42:22 +05:30
case Category :: FractionalRealEstateId :
return " public/assets/media/FrontendImages/fract-state.svg " ;
break ;
case Category :: VentureCapitalFundId :
return " public/assets/media/FrontendImages/capital-funds.svg " ;
break ;
case Category :: IndianCommercialRealEstateID :
return " public/assets/media/FrontendImages/comm-real-state.svg " ;
break ;
case Category :: HedgeFundId :
return " public/assets/media/FrontendImages/stra-fund.svg " ;
break ;
case Category :: FundForDistressedAssetId :
return " public/assets/media/FrontendImages/assets-funds.svg " ;
break ;
case Category :: PrivateRealEstateFundId :
return " public/assets/media/FrontendImages/private.svg " ;
break ;
case Category :: LongOnlyFundId :
return " public/assets/media/FrontendImages/bay-arrow.svg " ;
break ;
case Category :: InfrastructureFundId :
return " public/assets/media/FrontendImages/Infr-funds.svg " ;
break ;
case Category :: PrivateCreditFundId :
return " public/assets/media/FrontendImages/cradit-funds.svg " ;
break ;
case Category :: PrivateEquityFundId :
return " public/assets/media/FrontendImages/equity-funds.svg " ;
break ;
case Category :: AngelFundId :
return " public/assets/media/FrontendImages/angel-funds.svg " ;
break ;
case Category :: HedgeFundId :
return " public/assets/media/FrontendImages/stra-fund.svg " ;
break ;
case Category :: PrivateInvestmentInPublicEquityFundId :
return " public/assets/media/FrontendImages/pipe-funds.svg " ;
break ;
case Category :: GlobalHedgeFundId :
return " public/assets/media/FrontendImages/stra-fund.svg " ;
break ;
case Category :: GlobalPrivateCreditFundId :
return " public/assets/media/FrontendImages/cradit-funds.svg " ;
break ;
case Category :: GlobalPrivateEquityFundId :
return " public/assets/media/FrontendImages/equity-funds.svg " ;
break ;
case Category :: GlobalVentureCapitalFundId :
return " public/assets/media/FrontendImages/capital-funds.svg " ;
break ;
case Category :: IndianIndustrialRealEstateID :
return " public/assets/media/FrontendImages/login-img/alternative.svg " ;
break ;
case Category :: IndianResidentialRealEstateID :
return " public/assets/media/FrontendImages/resi-real-state.svg " ;
break ;
case Category :: IndianCommercialRealEstateID :
return " public/assets/media/FrontendImages/comm-real-state.svg " ;
break ;
case Category :: GlobalIndustrialRealEstateID :
return " public/assets/media/FrontendImages/login-img/alternative.svg " ;
break ;
case Category :: GlobalResidentialRealEstateID :
return " public/assets/media/FrontendImages/resi-real-state.svg " ;
break ;
case Category :: GlobalCommercialRealEstateID :
return " public/assets/media/FrontendImages/comm-real-state.svg " ;
break ;
default :
return 'public/assets/media/FrontendImages/bay-arrow.svg' ;
}
2024-06-07 16:19:29 +05:30
}
2024-06-07 17:53:10 +05:30
// function dNone($value = null)
// {
// if ($value) {
// return '';
// }
// return 'd-none';
// }