<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Bank extends Model{ protected $connection = 'mysql_w'; protected $table='banks'; protected $guarded=[]; //测试 // public function getNameAttribute($value){ // return '【 '.$value.' 】'; // } // // protected $appends = ['info']; // // public function getInfoAttribute() // { // return $this->user_id.'-'.$this->name.'-'.$this->attributes['name']; // } // // public function setNameAttribute($value) // { // $this->attributes['name']='【'.$value.'】'; // } }