<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class CustomerPlan extends Model { protected $fillable = [ 'plan_id', 'email_limit','available_emails', 'price','contact_limit' ]; public function plan(){ return $this->belongsTo(Plan::class,'plan_id')->withDefault(); } }