<?php

namespace App\Http\Controllers\Frontend;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\WhatWeDo;
use App\Models\NatureofInvestment;

class FrontEndController extends Controller
{
    public function WhatWeDo()
    {
        $WhatWeDoList=WhatWeDo::where('status',1)->get();
        $natureOfInvestments = NatureofInvestment::where('status', 1)->orderBy('name')->get();
        return view('frontend.who-we-do',compact('WhatWeDoList','natureOfInvestments'));
    }
    public function WhatWeDo_Details($slug)
    {
        $WhatWeDo = WhatWeDo::where('slug', $slug)->firstOrFail();
        $alldataWhatWeDo = WhatWeDo::where('slug', '!=', $slug)->get();
        $WhatWeDoList=WhatWeDo::where('status',1)->get();
        return view('frontend.what-we-do-details', compact('WhatWeDo','alldataWhatWeDo','WhatWeDoList'));

    }
    public function WhatWeDoList(){
        $WhatWeDoList = WhatWeDo::where('status',1)->get();
        // dd(json_decode($WhatWeDoList));
        return view('frontend.whowedoitfor-list', compact('WhatWeDoList'));
    }
}
