Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorException Undefined variable #5847

Open
odancer opened this issue Feb 18, 2024 · 0 comments
Open

ErrorException Undefined variable #5847

odancer opened this issue Feb 18, 2024 · 0 comments

Comments

@odancer
Copy link

odancer commented Feb 18, 2024

  • Laravel Version: 6.0
  • PHP Version: 7.4
  • Laravel-admin: 1.8

Description:

The code described below, I got ErrorException Undefined variable: devceid .
Does anybody have any idea ?

public function getmonitor(Request $request,Content $content)
{
       $deviceid = $request->input('devlist');
       #Log::info('User failed to logint.'.$deviceid);
       return $content
        ->title('設備監控')->row(function (Row $row) {
            $deviceconfig_db = new Deviceconfig();
            $m_rtn = $deviceconfig_db->getData($deviceid);
            foreach($m_rtn as $tmp) {
                 $graphid = $tmp['dev2'].$tmp['dev3'];
                 #Log::info('User failed to logint.'.$graphid);
                 ${"MQTTGW".$tmp['dev1']}= Dashboard::chartjs_monitor1($tmp['dev1'],$graphid,$tmp['dev3'],base64_encode($tmp['dev6']));
                 $row->column(1/4,new Box($tmp['dev2']." ".$tmp['dev7'], ${"MQTTGW".$tmp['dev1']}));
            }
        }); 


}

Steps To Reproduce:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant