// +---------------------------------------------------------------------- namespace app\common\models; class Payment extends Model { protected $name = "payment"; public function getPayConfig($name){ $row = $this->where("code",$name)->find(); if(empty($row["config"])) return []; return json_decode($row["config"],true); } }