1,'url'=>2,'name'=>'2342']];//Rome::where('end',0)->get(); // $content->title('房间监控'); // $content->description('房间监控'); // $content->row(); // $x='if (flvjs.isSupported()) { '; // foreach($data as $k=>$v){ // $url=config('love.PLAY_DOMAINS').'/live/'.config('love.IM_SDKAPPID').'_r'.$v->id.'.flv'; // $x=$x."var videoElement$k = document.getElementById('videoElement$k'); // var flvPlayer$k = flvjs.createPlayer({type: 'flv',url: '$url'}); // flvPlayer$k.attachMediaElement(videoElement$k);flvPlayer$k.load();flvPlayer$k.play();"; // } // $x=$x.'}'; // Admin::script(''.$x.';console.log("hello world");'); // $grid->setView('admin.grid.card'); // return $content // ->title('房间监控') // ->row(function($row) use ($data){ // $row->column(12,view('vomevideo')->with(['envs'=>$data])); // }); // } protected function grid() { $grid = new Grid(new Rome()); $grid->column('id', __('ID'))->sortable(); $grid->model()->where('end',0)->orderBy('id', 'desc'); $grid->setView('vomevideo'); return $grid; } public function store() { $id=request('id'); $x=$this->closeGroup($id); Rome::where('end',0)->where('id',$id)->update(['end'=>time()]); admin_toastr('断流成功!!!', 'success'); return redirect('admin/romevideo'); } }