content
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Mail\sendEmail;
|
||||
use App\Models\Advertisements;
|
||||
use App\Models\Articles;
|
||||
use App\Models\Economies;
|
||||
use App\Models\Horoscopes;
|
||||
@ -29,13 +30,20 @@ class WebsiteController extends Controller
|
||||
$headerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 1])->with('children')->orderBy('display_order')->get();
|
||||
// dd($headerMenuItems->toArray());
|
||||
$footerMenuItems = Menuitems::where(['parent_menu' => 0, "status" => 1, "menulocations_id" => 2])->with('children')->orderBy('display_order')->get();
|
||||
// dd($footerMenuItems->toArray());
|
||||
$recentNews = News::where('status', 1)->inRandomOrder()->limit(4)->get();
|
||||
$latestNews = News::where('status', 1)->inRandomOrder()->limit(4)->get();
|
||||
// dd($recentNews);
|
||||
|
||||
$ads = Advertisements::where('status', 1)->where('parent_advertisement',0)->get();
|
||||
// dd($ads->toArray());
|
||||
$adsWithChildren = Advertisements::where('status',1)->where('parent_advertisement',0)->orderBy('display_order')->with('children')->get();
|
||||
// dd($adsWithChildren->toArray());
|
||||
View::share(
|
||||
[
|
||||
'headerMenuItems' => $headerMenuItems,
|
||||
'footerMenuItems' => $footerMenuItems,
|
||||
'recentNews' => $recentNews,
|
||||
'latestNews' => $latestNews,
|
||||
'ads' => $ads,
|
||||
'adsWithChildren' => $adsWithChildren
|
||||
]
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user