MainController.php
783 Bytes
<?php
namespace App\Http\Controllers;
use App\Models\Banner;
use App\Models\Category;
use Illuminate\Http\Request;
class MainController extends Controller
{
public function index() {
$banners = Banner::query()->orderBy('id')->get();
$category = Category::query()->where('parent_id', '>', '0')->orderBy('id')->get();
return view('index', compact('banners', 'category'));
}
public function about_company() {
return view('company');
}
public function catalog() {
$category = Category::query()->orderBy('id')->get();
return view('catalog', compact('category'));
}
public function good() {
return view('good');
}
public function simple_good() {
return view('simple_good');
}
}