<?php

namespace App\Http\Controllers;

use App\Http\Resources\PermissionResource;
use App\Http\Requests\UsersRequest;
use App\Http\Resources\UserResource;
use App\Laravue\JsonResponse;
use App\Laravue\Models\Device;
use App\Laravue\Models\Users;
use App\Laravue\Models\Homepage;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\ResourceCollection;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Redis;
use Validator;

class UinappHomeController extends Controller
{
    public function devicedatainfo(){
//        $data = DB::table('device as d')
//            ->join('device_type as t','d.dtype','=','t.tid')
//            ->join('gas as g','d.status','=','g.id')
//            ->join('danwei as  w','d.devicemonad','=','w.id')
//            ->join('status as s','d.devicepolice','=','s.id')
//            ->join('users as u','d.uid','=','u.id')
//            ->where('d.id','=',$id)
//            ->select('d.*','t.tname','g.gas','w.danwei','s.status_name','u.username','u.isadmin')
//            ->first();
//        return $this->jsonSuccessData($data);

        return $this->jsonSuccessData('2313');
    }
}