Merge branch 'main' of https://github.com/Ritikeshyadav/my-freeu into megha
This commit is contained in:
@@ -30,7 +30,7 @@ class HomeController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
// dd($this->getAllTopPickProducts());
|
||||
// dd($this->getAllTopPickProducts()['data']->toArray());
|
||||
return view('Frontend.Pages.index', [
|
||||
'topPicks' => $this->getAllTopPickProducts(),
|
||||
'testimonial' => Testimonial::where('is_active',true)->get(),
|
||||
|
||||
@@ -411,7 +411,11 @@ class Product extends Model
|
||||
{
|
||||
$equitiesStockExchangeRealEstateRoute = 'https://jerichoalternatives.in/api/equities-stock-real-estate-single-data/';
|
||||
|
||||
$products = $query->select(\DB::raw('products.id,products.description,coalesce(fre.property_name_and_location,aif.fund_name,bd.issuer,fd.fund_name,exchange.name,re.property_name) as product_name'), 'products.categories_id as categories_id', 'categories.category_name', 'top_pick', 'fre.property_image', 'company_logo', 'file_name', \DB::raw('coalesce(fre.geographic_focus,aif.geographic_focus,bd.geographic_focus,fd.geographic_focus,exchange.geographic_focus,re.geographic_focus) as geographic_focus'), \DB::raw('coalesce(fre.minimum_investment,aif.minimum_investment,bd.minimum_investment,fd.minimum_investment,re.total_price) as minimum_investment'), \DB::raw('coalesce(fre.slug,aif.slug,bd.slug,fd.slug,re.slug,exchange.slug) as slug'),
|
||||
$products = $query->select(\DB::raw('products.id,products.description,coalesce(fre.property_name_and_location,aif.fund_name,bd.issuer,fd.fund_name,exchange.name,re.property_name) as product_name'),
|
||||
'products.categories_id as categories_id', 'categories.category_name', 'top_pick', 'fre.property_image','companies.id as company_id', 'company_logo', 'file_name',
|
||||
\DB::raw('coalesce(fre.geographic_focus,aif.geographic_focus,bd.geographic_focus,fd.geographic_focus,exchange.geographic_focus,re.geographic_focus) as geographic_focus'),
|
||||
\DB::raw('coalesce(fre.minimum_investment,aif.minimum_investment,bd.minimum_investment,fd.minimum_investment,re.total_price) as minimum_investment'),
|
||||
\DB::raw('coalesce(fre.slug,aif.slug,bd.slug,fd.slug,re.slug,exchange.slug) as slug'),
|
||||
// \DB::raw('coalesce(fre.property_description,aif.description,bd.about_issuer,fd.fund_description,exchange.about,re.remarks) as description')
|
||||
// \DB::raw('coalesce(products.description) as description')
|
||||
// 'products.description'
|
||||
@@ -422,7 +426,11 @@ class Product extends Model
|
||||
->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')
|
||||
->leftJoin('companies', 'aif.companies_id', 'companies.id')
|
||||
->leftJoin('companies', function($query){
|
||||
$query->on('aif.companies_id', 'companies.id');
|
||||
$query->orOn('fd.platform_partner', 'companies.id');
|
||||
$query->orOn('re.platform_partner', 'companies.id');
|
||||
})
|
||||
->leftJoin('product_photo_documents as ppd', function ($query) {
|
||||
$query->on('re.id', 'ppd.real_estates_id')
|
||||
->where('ppd.type', 0);
|
||||
|
||||
Reference in New Issue
Block a user