1, ]; protected $with = ['owner']; public function __construct(array $attributes = []) { parent::__construct($attributes); $this->table = 'pages';//config('module.pages.table'); } public function owner() { return $this->belongsTo(User::class, 'created_by'); } /** * @return bool */ public function isActive() { return $this->status == 1; } }