<?php

namespace App\Http\Controllers\Web;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\{Contact, ProductCategory, About};

class ProfileController extends Controller
{
    public function index(Request $request){
        $q_name = $request->q_name;
        $q_category_id = $request->q_category_id;
        $product_category = ProductCategory::limit(5)->get();
        $about = About::first();
        $contact = Contact::first();

        return view('apps.web.profile')->with('contact', $contact)
                                        ->with('about', $about)
                                    ->with('product_category', $product_category)
                                    ->with('q_category_id', $q_category_id)
                                    ->with('q_name', $q_name);
    }
}
