<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Goodattr extends Model { protected $table='good_attr'; // public function get_attr(){ // return $this->hasMany(Goodattr::class,'id','pid'); // } }