<?php


namespace App\Admin\Controllers;


use App\Model\DeviceBox;
use Encore\Admin\Controllers\AuthController as BaseAuthController;
use Illuminate\Http\Request;

class ApiController extends BaseAuthController
{
    public function get_box(Request $request)
    {
        $id = $request->get('q');
        return DeviceBox::where(['device_id'=>$id])->get(['name as text','id']);
    }

}
