With function not working to load has many relation data laravel Model Eloquent
问题 I have these two model. This phone model is a common model which can be used to save and fetch the phone value for a user, customer, Employee and so on. So the meta_value is used to save the id of related model and meta_key is used to determine the model name relation. /* Customer Model*/ namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class Customer extends Model { /** * Get the Phone List. */ public function phones(){ return $this-