home
/
zktecojo
/
public_html
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Database
/
Eloquent
/
Relations
➕ New
📤 Upload
✎ Editing:
MorphOne.php
← Back
<?php namespace Illuminate\Database\Eloquent\Relations; use Illuminate\Database\Eloquent\Collection; class MorphOne extends MorphOneOrMany { /** * Get the results of the relationship. * * @return mixed */ public function getResults() { return $this->query->first(); } /** * Initialize the relation on a set of models. * * @param array $models * @param string $relation * @return array */ public function initRelation(array $models, $relation) { foreach ($models as $model) { $model->setRelation($relation, null); } return $models; } /** * Match the eagerly loaded results to their parents. * * @param array $models * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @return array */ public function match(array $models, Collection $results, $relation) { return $this->matchOne($models, $results, $relation); } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel