<?php

namespace App\Http\Controllers\Web;

use App\Http\Controllers\Controller;
use App\Models\Category;
use App\Models\ManufacturingCompany;
use App\Models\Post;
use App\Models\Project;
use Illuminate\Http\Request;

class SupplierController extends Controller
{

    public function index()
    {

        $title = 'Suppliers';

        $suppliers = ManufacturingCompany::orderBy('id', 'desc')->get();
        return view('web.suppliers.index', compact('suppliers' , 'title'));
    }

    public function show($slug)
    {

        $title = 'Suppliers';

        $supplier = ManufacturingCompany::findBySlugOrFail($slug);
        $title_model = 'About Company';

        return view('web.suppliers.show', compact('supplier' , 'title' , 'title_model'));
    }
}
