<?php

namespace App\Http\Controllers\API\mH5;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class IndustryController extends Controller
{

    //获取行业列表
    public function GetIndustry()
    {
        $institution_id=request('institution_id');
        $alllist=DB::table('industry')->get();
        $enablelist=DB::table('institution_seting')->where(['institution_id'=>$institution_id])->get();
        $list=[];
        foreach ($alllist as $key=>$item){
            foreach ($enablelist as $K=>$it){
                if($item->name == $it->small_check_type  and  $it->enable_yuyue==1){
                    $list[]=$item;
                }
            }
        }
        return \Yz::Return(true,'查询成功',$list);
    }
}
