for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LaravelFreelancerNL\Aranguent\Eloquent\Relations;
use Illuminate\Database\Eloquent\Relations\MorphMany as IlluminateMorphMany;
class MorphMany extends IlluminateMorphMany
{
/**
* Set the base constraints on the relation query.
*
* @return void
*/
public function addConstraints()
if (static::$constraints) {
$this->query->where($this->foreignKey, '=', $this->getParentKey());
$this->query->whereNotNull($this->foreignKey);
$this->query->where($this->morphType, $this->morphClass);
}