20 lines
461 B
PHP
20 lines
461 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Brand;
|
|
use App\Models\News;
|
|
use App\Settings\HomeSettings;
|
|
|
|
class HomePageController extends Controller
|
|
{
|
|
public function index()
|
|
{
|
|
$brands = Brand::query()->get(['id', 'image']);
|
|
$homeSettings = app(HomeSettings::class);
|
|
$allNews = News::query()->latest()->take(3)->get();
|
|
|
|
return view('web.pages.home.index', compact('homeSettings', 'brands', 'allNews'));
|
|
}
|
|
}
|