whoami7 - Manager
:
/
home
/
qbizpnmr
/
test.qbiztax.com
/
app
/
Relations
/
HasMany
/
Upload File:
files >> //home/qbizpnmr/test.qbiztax.com/app/Relations/HasMany/Category.php
<?php namespace App\Relations\HasMany; use App\Models\Setting\Category as Model; use Illuminate\Database\Eloquent\Relations\HasMany; class Category extends HasMany { /** * Get the results of the relationship. * * @return mixed */ public function getResults() { if (! is_null($this->getParentKey()) && $this->related instanceof Model) { return $this->query->getWithoutChildren(); } return ! is_null($this->getParentKey()) ? $this->query->get() : $this->related->newCollection(); } }
Copyright ©2021 || Defacer Indonesia