Merge pull request #298 from Ritikeshyadav/RitikeshFreeu
fixed slug issues
This commit is contained in:
@@ -500,7 +500,7 @@ class ManageFreeUInvestmentController extends Controller
|
||||
$count = Fund::where('issuer', $request->issuer)->count();
|
||||
$fund = Fund::where('id', $request->fund_id)->update([
|
||||
'issuer' => $request->issuer,
|
||||
'slug' => $count < 2 ? Str::slug($request->issuer) : Str::slug($request->issuer).'-'.$count+1,
|
||||
'slug' => Str::slug($request->issuer).'-'.++$count,
|
||||
'fund_name' => $request->fund_name,
|
||||
'geographic_focus' => $request->geographic_focus,
|
||||
'fund_type' => $request->fund_type,
|
||||
@@ -843,7 +843,7 @@ class ManageFreeUInvestmentController extends Controller
|
||||
$count = RealEstate::where('property_name',$request->property_name)->count();
|
||||
$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,
|
||||
'slug' => Str::slug($request->property_name).'-'.++$count,
|
||||
'platform_partner' => $request->companies_id,
|
||||
'geographic_focus' => $request->geographic_focus,
|
||||
'price_per_sq_ft' => $request->price_per_sq_ft,
|
||||
|
||||
@@ -135,7 +135,7 @@ class VentureCapitalFundController extends Controller
|
||||
|
||||
|
||||
$alternativeInvestmentFund = AlternativeInvestmentFund::where('id', $request->id)->update([
|
||||
'slug' => Str::slug($request->fund_name).'-'.$count+1,
|
||||
'slug' => Str::slug($request->fund_name).'-'.++$count,
|
||||
'fund_name' => $request->fund_name,
|
||||
'geographic_focus' => $request->geographic_focus,
|
||||
'companies_id' => $request->companies_id,
|
||||
|
||||
@@ -68,7 +68,7 @@ class AlternativeInvestmentFundImport implements ToCollection, WithHeadingRow
|
||||
|
||||
AlternativeInvestmentFund::create([
|
||||
'products_id' => $product->id,
|
||||
'slug' => Str::slug($row['name_of_the_fund']) . '-' . $count+1,
|
||||
'slug' => Str::slug($row['name_of_the_fund']) . '-' . ++$count,
|
||||
'fund_name' => $row['name_of_the_fund'],
|
||||
'registration_number' => $row['registration_no'] ?? null,
|
||||
'fund_category' => $row['fund_category_iiiiii'],
|
||||
|
||||
@@ -20,7 +20,7 @@ class FundImport implements ToCollection, WithHeadingRow
|
||||
*/
|
||||
protected $category_id;
|
||||
|
||||
public function __construct($category_id,)
|
||||
public function __construct($category_id)
|
||||
{
|
||||
$this->category_id = $category_id;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ class FundImport implements ToCollection, WithHeadingRow
|
||||
$count = Fund::where('issuer',$row['issuer'])->count();
|
||||
$fund = Fund::create([
|
||||
'products_id' => $product->id,
|
||||
'slug' => Str::slug($row['issuer']).'-'.$count+1,
|
||||
'slug' => Str::slug($row['issuer']).'-'.++$count,
|
||||
'issuer' => $row['issuer'],
|
||||
'geographic_focus' => "Global",
|
||||
'fund_name' => $row['fund_name'],
|
||||
|
||||
@@ -68,7 +68,7 @@ class RealEstateImport implements ToCollection, WithHeadingRow
|
||||
RealEstate::create([
|
||||
'products_id' => $product->id,
|
||||
// 'companies_id' => $row['companies_id'],
|
||||
'slug' => Str::slug($row['property_name']).'-'.$count+1,
|
||||
'slug' => Str::slug($row['property_name']).'-'.++$count,
|
||||
'property_name' => $row['property_name'],
|
||||
'geographic_focus' => $this->category_id == 20 ? 'Global' : ($this->category_id == 21 ? 'Global' : ($this->category_id == 22 ? 'Global' : 'India')),
|
||||
'property_location' => $row['property_location'],
|
||||
|
||||
Reference in New Issue
Block a user