image show and edit
This commit is contained in:
@@ -41,6 +41,7 @@ use Illuminate\Support\Str;
|
||||
use App\Models\ProductPhotoDocuments;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use File;
|
||||
use App\Models\Company;
|
||||
|
||||
class ManageFreeUInvestmentController extends Controller
|
||||
{
|
||||
@@ -454,11 +455,12 @@ class ManageFreeUInvestmentController extends Controller
|
||||
|
||||
public function editFundProduct($id)
|
||||
{
|
||||
$companies = Company::active()->pluck('company_name', 'id');
|
||||
// $categories = Category::all();
|
||||
// $products = Product::with('category', 'fractional_real_estate.companies')->fractionalrealestate()->find($id);
|
||||
$fund = Product::with('category', 'funds.returns', 'product_images')->funds()->find($id);
|
||||
// dd($fund);
|
||||
return view('Admin.Pages.manage_freeu_investment.edit-product.funds', compact('fund'));
|
||||
return view('Admin.Pages.manage_freeu_investment.edit-product.funds', compact('fund','companies'));
|
||||
}
|
||||
|
||||
public function updateFundProduct(Request $request)
|
||||
@@ -502,6 +504,7 @@ class ManageFreeUInvestmentController extends Controller
|
||||
'fund_name' => $request->fund_name,
|
||||
'geographic_focus' => $request->geographic_focus,
|
||||
'fund_type' => $request->fund_type,
|
||||
'platform_partner' =>$request->companies_id,
|
||||
'about_issuer' => $request->about_issuer,
|
||||
'fund_description' => $request->description,
|
||||
'sharpe_ratio' => $request->sharpe_ratio,
|
||||
@@ -773,6 +776,8 @@ class ManageFreeUInvestmentController extends Controller
|
||||
return view('Admin.Pages.manage_freeu_investment.upload-product.real-estate', compact('text', 'category_id', 'excelName'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function uploadRealEstateFile(Request $request)
|
||||
{
|
||||
request()->validate([
|
||||
@@ -793,9 +798,12 @@ class ManageFreeUInvestmentController extends Controller
|
||||
|
||||
public function editRealEstateProduct($id)
|
||||
{
|
||||
$companies = Company::active()->pluck('company_name', 'id');
|
||||
// dd($companies);
|
||||
$categories = Category::all();
|
||||
$products = Product::with('category','realEstates', 'product_images')->realestates()->find($id);
|
||||
return view('Admin.Pages.manage_freeu_investment.edit-product.real-estate', compact('products', 'categories'));
|
||||
// dd($products);
|
||||
return view('Admin.Pages.manage_freeu_investment.edit-product.real-estate', compact('products', 'categories','companies'));
|
||||
}
|
||||
|
||||
public function updateRealEstateProduct(Request $request)
|
||||
@@ -835,7 +843,7 @@ class ManageFreeUInvestmentController extends Controller
|
||||
$realEstate = RealEstate::where('id', $request->realEstates)->update([
|
||||
'property_name' => $request->property_name,
|
||||
'slug' => $count < 2 ? Str::slug($request->property_name) : Str::slug($request->property_name).'-'.$count+1,
|
||||
// 'companies_id' => $request->companies_id,
|
||||
'platform_partner' => $request->companies_id,
|
||||
'geographic_focus' => $request->geographic_focus,
|
||||
'price_per_sq_ft' => $request->price_per_sq_ft,
|
||||
'property_location' => $request->property_location,
|
||||
@@ -1476,7 +1484,7 @@ class ManageFreeUInvestmentController extends Controller
|
||||
|
||||
public function updateAIFProduct(Request $request)
|
||||
{
|
||||
dd($request->all());
|
||||
// dd($request->all());
|
||||
$request->validate([
|
||||
'fund_name' => 'required'
|
||||
]);
|
||||
|
||||
@@ -32,7 +32,7 @@ class IndianRealAssetController extends Controller
|
||||
public function residential()
|
||||
{
|
||||
$realEstate = $this->indianResidentialRealEstateAllData()->getData();
|
||||
$openIRRE = Product::has('realEstate')->with('realEstate','categorys')->indianResidentialRealEstate()->open()->active()->get();
|
||||
$openIRRE = Product::has('realEstate')->with('realEstate.companies','categorys')->indianResidentialRealEstate()->open()->active()->get();
|
||||
$resaleIRRE = Product::has('realEstate')->with('realEstate','categorys')->indianResidentialRealEstate()->resale()->active()->get();
|
||||
$fullyFundedIRRE = Product::has('realEstate')->with('realEstate','categorys')->indianResidentialRealEstate()->fullyFunded()->active()->get();
|
||||
$learnMore = (new FractionalRealEstateFrontendController)->indianResidentialRealEstateQuestionAndAnswer()->getData();
|
||||
|
||||
@@ -23,4 +23,10 @@ class RealEstate extends Model
|
||||
public function realEstateDocuments(){
|
||||
return $this->hasMany(ProductPhotoDocuments::class,'real_estates_id')->where('type',1);
|
||||
}
|
||||
|
||||
public function companies(){
|
||||
return $this->belongsTo(Company::class,'platform_partner');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ function imagePath($path = null)
|
||||
$finalPath = "https://staging.jerichoalternatives.in/";
|
||||
}
|
||||
if (env('APP_ENV') == 'local') {
|
||||
$finalPath = "http://localhost/my-freeu/";
|
||||
$finalPath = "http://localhost/new_freeu/my-freeu/";
|
||||
}
|
||||
return $finalPath . $path;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPlatformPartnerToRealEstates extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('real_estates', function (Blueprint $table) {
|
||||
//platform_partner
|
||||
$table->unsignedBigInteger('platform_partner')->after('products_id');
|
||||
$table->foreign('platform_partner')->references('id')->on('companies')->onDelete('cascade');
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('real_estates', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -167,6 +167,34 @@
|
||||
|
||||
</div>--}}
|
||||
|
||||
<div class="col-md-6">
|
||||
<label class="fs-6 fw-semibold form-label mt-3">
|
||||
|
||||
<span class="required">Company (For Image)</span>
|
||||
|
||||
<!-- <i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Enter the contact's name."></i> -->
|
||||
|
||||
</label>
|
||||
|
||||
<div class="add_cat d-flex align-itmes-center add_category_with_select">
|
||||
|
||||
<select class="form-select form-select-solid" data-control="select2" data-hide-search="true" data-placeholder="Select a Company" name="companies_id">
|
||||
|
||||
<option value="">Select a Company</option>
|
||||
|
||||
|
||||
@foreach($companies as $key=>$company)
|
||||
|
||||
<option value="{{$key}}" {{$key == $fund->funds->companies_id?'selected="selected"':null}}?>{{$company}}</option>
|
||||
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<!--begin::Label-->
|
||||
|
||||
@@ -166,6 +166,34 @@
|
||||
|
||||
</div>--}}
|
||||
|
||||
<div class="col-md-6">
|
||||
<label class="fs-6 fw-semibold form-label mt-3">
|
||||
|
||||
<span class="required">Company (For Image)</span>
|
||||
|
||||
<!-- <i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Enter the contact's name."></i> -->
|
||||
|
||||
</label>
|
||||
|
||||
<div class="add_cat d-flex align-itmes-center add_category_with_select">
|
||||
|
||||
<select class="form-select form-select-solid" data-control="select2" data-hide-search="true" data-placeholder="Select a Company" name="companies_id">
|
||||
|
||||
<option value="">Select a Company</option>
|
||||
|
||||
|
||||
@foreach($companies as $key=>$company)
|
||||
|
||||
<option value="{{$key}}" {{$key == $products->realEstates->companies_id?'selected="selected"':null}}?>{{$company}}</option>
|
||||
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<!--begin::Label-->
|
||||
|
||||
@@ -3,11 +3,15 @@
|
||||
<h2>{{$type}}</h2>
|
||||
@if(count($irreAllData))
|
||||
<div class="parimay-card mt-4 mb-4">
|
||||
{{-- @dd($irreAllData[1]->realEstate->companies->company_logo); --}}
|
||||
@foreach($irreAllData as $ffdaData)
|
||||
<div class="assets-card aos-init aos-animate" data-aos="fade-up">
|
||||
<a href="{{ auth()->guard('users')->check() == true ? route('ire.product',$ffdaData->realEstate->slug) : route('login') }}" data-route="{{route('ire.product',$ffdaData->realEstate->slug)}}" class="redirect_to_page">
|
||||
<div class="card-logo bg-white">
|
||||
<img src="{{imagePath('public/assets/media/FrontendImages/menu-logo.png')}}">
|
||||
{{-- @if($loop->iteration == 2)
|
||||
@dd($ffdaData->realEstate->compaines)
|
||||
@endif --}}
|
||||
<img src="{{ $ffdaData->realEstate->companies != null ? $ffdaData->realEstate->companies->company_logo : imagePath('public/assets/media/FrontendImages/menu-logo.png')}}">
|
||||
</div>
|
||||
<div class="blur-md">
|
||||
@if($ffdaData->realEstate->geographic_focus == 'India')
|
||||
|
||||
Reference in New Issue
Block a user