/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/Database/Fixtures/Models/EloquentModelUsingUuid.php
39 строк
699 B
Ed Grosvenor
[11.x] Fix foreignIdFor() when the foreign key is a non-incrementing integer other than ULID (#53696)
29 ноя 2024, 17:36
Не верифицирован
29 ноя 2024, 17:36
bbd61dd
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\Database\Fixtures\Models; use Illuminate\Database\Eloquent\Model; class EloquentModelUsingUuid extends Model { /** * The table associated with the model. * * @var string */ protected $table = 'model'; /** * The "type" of the primary key ID. * * @var string */ protected $keyType = 'string'; /** * Indicates if the IDs are auto-incrementing. * * @var bool */ public $incrementing = false; /** * Get the default foreign key name for the model. * * @return string */ public function getForeignKey() { return 'model_using_uuid_id'; } }