<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kamicloud / laravel-unofficial-relations example snippets
`
* Can load relation by id array or string
*
* @param $related
* @param string|null $foreignKey Format id1, id2 | array<id>
* @param string|null $relatedKey
* @param string|callable $delimiter Default ',', allows customize function or null(for array foreignKey)
`
* Can load morphTo with customize map
*
* @param string $name
* @param string $type Same as MorphTo
* @param string $id Same as MorphTo
* @param string $ownerKey Same as MorphTo
* @param array|null $map [Morph type key name in DB => Model namespace]
`
* Can load morphTo with customize map and id can be a set
*
* @param string $name
* @param string $type Same as MorphTo
* @param string $id Same as MorphTo
* @param string $ownerKey Same as MorphTo
* @param array|null $map Same as HasMorphToByMapRelation
* @param string|callable $delimiter Same as HasManyBySetRelationship
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.