<?php

namespace App\Http\Controllers\Shop;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

use App\Repositories\Shop\Articles;
use App\Repositories\Shop\TagGroups;
use App\Repositories\Shop\Homepages;

class HomeController extends Controller
{
    public function index(Request $request)
    {
        $data = [
            'display_by_rows' => $request->input('by_rows') ?? false,
            'shelves' => Articles::getArticlesByHomepage(),
            'text' => Homepages::getHomepage(),
            'tags' => TagGroups::getWithTagsAndCountOffers(),
            'no_filter' => true,
        ];
        return view('Shop.home', $data);
    }
}
