Blame view
app/Http/Controllers/MainController.php
783 Bytes
b80175387 Начальный проект ... |
1 2 3 |
<?php namespace App\Http\Controllers; |
1bd0c6ebe Админка, товары. ... |
4 5 |
use App\Models\Banner; use App\Models\Category; |
b80175387 Начальный проект ... |
6 7 8 9 10 |
use Illuminate\Http\Request; class MainController extends Controller { public function index() { |
1bd0c6ebe Админка, товары. ... |
11 12 13 |
$banners = Banner::query()->orderBy('id')->get(); $category = Category::query()->where('parent_id', '>', '0')->orderBy('id')->get(); return view('index', compact('banners', 'category')); |
b80175387 Начальный проект ... |
14 15 16 17 18 19 20 |
} public function about_company() { return view('company'); } public function catalog() { |
1bd0c6ebe Админка, товары. ... |
21 22 |
$category = Category::query()->orderBy('id')->get(); return view('catalog', compact('category')); |
b80175387 Начальный проект ... |
23 24 25 26 27 28 29 30 31 32 |
} public function good() { return view('good'); } public function simple_good() { return view('simple_good'); } } |