<?php

namespace App\Http\Controllers;

use App\Models\IndustryPage;
use App\Models\ListIndustryPage;
use Illuminate\Http\Request;

class IndustryPageController extends Controller
{
    public function __invoke()
    {
        $page = IndustryPage::first()->makeHidden(['id', 'created_at', 'updated_at']);
        if ($page) {
            $list = ListIndustryPage::all()->makeHidden(['id', 'created_at', 'updated_at']);
            $page->list = $list;
            return response()->json($page);
        }
        return response()->json("recored not found");
    }
}
