REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 2.68 KB
Close
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasUniqueStringIds.php
Text
Base64
<?php namespace Illuminate\Database\Eloquent\Concerns; use Illuminate\Database\Eloquent\ModelNotFoundException; trait HasUniqueStringIds { /** * Generate a new unique key for the model. * * @return mixed */ abstract public function newUniqueId(); /** * Determine if given key is valid. * * @param mixed $value * @return bool */ abstract protected function isValidUniqueId($value): bool; /** * Initialize the trait. * * @return void */ public function initializeHasUniqueStringIds() { $this->usesUniqueIds = true; } /** * Get the columns that should receive a unique identifier. * * @return array */ public function uniqueIds() { return $this->usesUniqueIds() ? [$this->getKeyName()] : parent::uniqueIds(); } /** * Retrieve the model for a bound value. * * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Relations\Relation<*, *, *> $query * @param mixed $value * @param string|null $field * @return \Illuminate\Contracts\Database\Eloquent\Builder * * @throws \Illuminate\Database\Eloquent\ModelNotFoundException */ public function resolveRouteBindingQuery($query, $value, $field = null) { if ($field && in_array($field, $this->uniqueIds()) && ! $this->isValidUniqueId($value)) { $this->handleInvalidUniqueId($value, $field); } if (! $field && in_array($this->getRouteKeyName(), $this->uniqueIds()) && ! $this->isValidUniqueId($value)) { $this->handleInvalidUniqueId($value, $field); } return parent::resolveRouteBindingQuery($query, $value, $field); } /** * Get the auto-incrementing key type. * * @return string */ public function getKeyType() { if (in_array($this->getKeyName(), $this->uniqueIds())) { return 'string'; } return parent::getKeyType(); } /** * Get the value indicating whether the IDs are incrementing. * * @return bool */ public function getIncrementing() { if (in_array($this->getKeyName(), $this->uniqueIds())) { return false; } return parent::getIncrementing(); } /** * Throw an exception for the given invalid unique ID. * * @param mixed $value * @param string|null $field * @return never * * @throws \Illuminate\Database\Eloquent\ModelNotFoundException */ protected function handleInvalidUniqueId($value, $field) { throw (new ModelNotFoundException)->setModel(get_class($this), $value); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 14
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
GuardsAttributes.php
5.98 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasAttributes.php
68.05 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasEvents.php
11.83 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasGlobalScopes.php
3.92 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasRelationships.php
34.61 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasTimestamps.php
5.09 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasUlids.php
536 B
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasUniqueIds.php
1012 B
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasUniqueStringIds.php
2.68 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasUuids.php
531 B
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HasVersion7Uuids.php
315 B
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
HidesAttributes.php
2.84 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PreventsCircularRecursion.php
3.07 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
QueriesRelationships.php
36.34 KB
lrw-rw-rw-
2025-09-17 06:53:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).