1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
<?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';
}
}
|