app/Http/Controllers/HomeController.php
/**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
Show the application dashboard.
@return \Illuminate\Contracts\Support\Renderable
Show the application dashboard . @return \ Illuminate \ Contracts \ Support \ Renderable
public function index()
    { 
        $tenders = Tender::count();
        $active_tenders = Tender::where('status', true)->with('tenderCategories')->get();
        return view('home', compact('active_tenders', 'tenders'));
    }
public function index ( ) { $ tenders = Tender :: count ( ) ; $ active_tenders = Tender :: where ( 'status' , true ) -> with ( 'tenderCategories' ) -> get ( ) ; return view ( 'home' , compact ( 'active_tenders' , 'tenders' ) ) ; }
Show the application dashboard.
Show the application dashboard .
//dd($tenders->toArray());