模型 class Home extends Model { use SoftDelete; protected $deleteTime = 'delete_time'; protected $table='nam'; public function store($date,$savename){ $this->username=$date['username']; $this->password=$date['password']; $this->repassword=$date['repassword']; $this->type_id=$date['type_id']; $this->pic=$savename; $this->nam=$date['nam']; $this->content=$date['content']; return $this->save(); } public function show($keyword){ return $this->join('type','nam.type_id=type.type_id')->where('username','like',"%$keyword%")->paginate([ 'list_rows'=>'2', 'query'=>compact('keyword'), ]); } public function del($id){ return $this->
tp6基于mav的增删改查(回收站)
于 2022-03-06 19:45:22 首次发布