public static function saveStuff($arr) { $obj = new Dashboard(); foreach ($arr as $key => $value) { $obj->{$key} = $value; } $obj->save(); }
/** * Execute the console command. * * @return mixed */ public function handle($x = "p") { $this->comment("Your name is {$x}\n"); $this->comment(Dashboard::find(90)->valid_results); }